Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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,319

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,319

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

Board footer

Powered by FluxBB