Page 1 of 1
fetching entries NOT from category
Posted: Sun Sep 21, 2008 1:21 pm
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

Re: fetching entries NOT from category
Posted: Sun Sep 21, 2008 2:03 pm
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
Posted: Sun Sep 21, 2008 2:40 pm
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.
