Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-10-11 11:16:27
- jadehouse
- Member
- Registered: 2007-06-26
- Posts: 75
previous/next titles by category?
I have two categories of articles, which is “articles” and “news” — separate parts of the same site. But now that I’m trying to use previous/next links within their own parts, it seems I can’t do that by categories. What are my options…?
If that’s confusing, I’ll try to give an example. If you are reading a an article in the category “news”, I only want the next/previous links to show other articles from that category.
I wish there was sub-sectioning so I could do this the proper way, but o’well for now. Please let me know how to do it if you have the knowledge to complete the above.
Last edited by jadehouse (2007-10-11 11:35:15)
Offline
Re: previous/next titles by category?
Hmmm… I tried to achieve the same using the <if_category> but it didn’t work.
Offline
Re: previous/next titles by category?
I’ve also tested <if_article_category> but doesn’t seem to work.
Offline
Re: previous/next titles by category?
if i remember correctly, jk_neighbour can do this.
from the help:
These tags work exactly the same as link_to_prev and link_to_next, with three added attributes: cat, used to restrict results to a articles with a specific category1 (cat=“current” restricts results to the current category), sortby, which can be “posted” or an alternate value such as “title”, and showfurture, which if set to “1”, will return articles with posted dates in the future (defaults to “0”).
Last edited by sthmtc (2007-10-11 12:26:58)
Offline
Offline
#6 2007-10-11 22:14:18
- jadehouse
- Member
- Registered: 2007-06-26
- Posts: 75
Re: previous/next titles by category?
One more question (thanks btw for the plugin — works great). If there isn’t a previous or next article, how would I leave something else there in the link’s place?
Last edited by jadehouse (2007-10-11 22:34:14)
Offline
Re: previous/next titles by category?
text is displayed..
like this… http://raymond.kw-wu.com/weddings/michelle-james/1/
Offline
#8 2007-10-12 00:09:55
- jadehouse
- Member
- Registered: 2007-06-26
- Posts: 75
Re: previous/next titles by category?
Lozmatic: I’m asking how you leave something in it’s place if there isn’t (by default nothing is left). How did you do that?
Last edited by jadehouse (2007-10-12 00:12:39)
Offline
Re: previous/next titles by category?
jadehouse, I don’t think there is the option to display anything other than the unlinked Next / Previous text. If that’s what you’re asking.
Offline
#10 2007-10-12 21:24:24
- jadehouse
- Member
- Registered: 2007-06-26
- Posts: 75
Re: previous/next titles by category?
lozmatic wrote:
jadehouse, I don’t think there is the option to display anything other than the unlinked Next / Previous text. If that’s what you’re asking.
How do I display the unliked Next / Previous, though?
Offline
Re: previous/next titles by category?
jadehouse wrote:
How do I display the unliked Next / Previous, though?
jk_neighbour has same attributes than in-build link_to_prev and link_to_next, so same will work, as with it. Use showalways="1"
, like ie:
<txp:jk_link_to_prev showalways="1" cat="current">Previous</txp:jk_link_to_prev>
<txp:jk_link_to_next showalways="1" cat="current">Next</txp:jk_link_to_next>
Cheers!
Last edited by Gocom (2007-10-13 01:10:30)
Offline
Pages: 1