fetching entries NOT from category

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
Krzyzak
Regular
Posts: 41
Joined: Mon Oct 16, 2006 1:13 pm

fetching entries NOT from category

Post by Krzyzak »

Hi.
I would like to fetch entries from all of categories, excluding two of them -lets say, categoryid=5 and 9. How can I do this? Currently I've got:

Code: Select all

serendipity_fetchPrintEntries noSticky='TRUE' limit="0,5" template="entries_tab.tpl" full="FALSE"}
Any help'll be appreciated ;)
Sorry for my language errors- It`s not my native language.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: fetching entries NOT from category

Post by garvinhicking »

Hi!

This is not possible with the {serendipity_fetchPrintEntrie} call at the moment. You need to set $serendipity['GET']['hide_category'] to the category you want to hide (append multiple IDs with a ";")and then issue the call. You could do that by creating a custom smarty function.

Also, the current smarty function could be patched to add another parameter that supports that call. If you know some PHP you could achieve that by editing the include/functions_smarty.inc.php file, function serendipity_smarty_fetchPrintEntries -- I could then commit that.

Ifyou don't knowhow to do that, rmeind me again next weekend and I'll try to patch it for you.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Krzyzak
Regular
Posts: 41
Joined: Mon Oct 16, 2006 1:13 pm

Post by Krzyzak »

Ok, I've done it much easier (and faster) - I've set all categories, which I want to display instead of setting categories, which I dont want to display ;)
K.I.S.S. ;)
Sorry for my language errors- It`s not my native language.
Post Reply