Page 1 of 1

Serendipity display variables

Posted: Wed Oct 19, 2005 7:51 am
by judebert
I'm modifying the sidebar hider to recognize additional locations, such as the front page. Since I check for serendipity['GET']['category'], I actually get front page behavior on any non-category view. So I'd like to know how to determine whether I'm in an entry view, too. (And if I am in an entry, I'd like to know what categories have been assigned to it, but that's gonna take a database lookup.)

I've been searching posts, but what's really needed is a list of all the GET variables. If there are POST variables, a list of them could be useful, too. After all, I'll probably look into author views and such eventually.

Re: Serendipity display variables

Posted: Wed Oct 19, 2005 11:10 am
by garvinhicking
The entryview can be detected if $serendipity['GET']['id'] is set to a numeric value. :)

And right, you need to do the category lookup in that case by id. Either do it with your own SQL query, or use serendipity_fetchEntry($serendipity['GET']['id']) to get the whole entry and just introspect the 'categories' array key.

Sadly we don't really have much of a GET/POST variable documentation. :(

Best regards,
Garvin