Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2008-05-27 02:14:14
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: link to previous/next in same category
Huhh??!!
The following is copied from the same source:
<txp:jra_link_to_prev sort="custom_7,LastMod desc"
section=‘listings’ >[<< Prev]</txp:jra_link_to_prev>
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#14 2008-05-27 11:35:22
- ultramega
- Member
- Registered: 2006-02-26
- Posts: 221
Re: link to previous/next in same category
Sorry Uli, if I didn’t understood your post, or I was unclear, but what I need is to filter by category2 & section and then sort by title alphabetical.
Offline
#15 2008-05-27 12:21:43
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: link to previous/next in same category
I really am no coder, and Jean Rajotte could do this easily if he is willing, but do me the favor and look at the plugin’s code where it reads
'section' => $s,
Immediately below try adding the following
'category' => $category2,
Let’s see if it works :)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#16 2008-05-27 12:25:16
- ultramega
- Member
- Registered: 2006-02-26
- Posts: 221
Re: link to previous/next in same category
Ok, great, let’s test!
Offline
#17 2008-05-27 14:15:57
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: link to previous/next in same category
I get it working, but only the hard-coded way:
Remove the line from post #15. Look for the line beginning with $where = '1=1 and Status=4
and replace the complete line with the following:
$where = '1=1 and Status=4 and Category2="your_category2" ';
:)
Enter your cat 2. In case it doesn’t work, swap name/title of the category (in the above line ;)
Last edited by uli (2008-05-27 14:17:53)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#18 2008-05-27 15:47:30
- ultramega
- Member
- Registered: 2006-02-26
- Posts: 221
Re: link to previous/next in same category
Haa! Getting closer, expect I need dynamically resolve current article’s category, so it would be somehow like this:
$foo = “category2 of current article’”
and then your line;
$where = ’1=1 and Status=4 and Category2=“foo” ‘; :)
No idea how that should be coded, though…
Offline
#19 2008-05-27 16:52:39
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: link to previous/next in same category
Me neither. I’d use hardcoding plus some conditionals.
But maybe Jean Rajotte is willing to add the two extra lines.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#20 2008-05-28 07:11:30
- ultramega
- Member
- Registered: 2006-02-26
- Posts: 221
Re: link to previous/next in same category
Ok, thanks for your co-operate, Uli :)
Offline