Recent Topics

1 Apr 03, 2006 08:05    

Sorry for perhaps a dumb question.

How would i detect in _main.php (my skin's main) what type of page i am generating? (i.e. whether its a search, category listing, comment or calendar entry display, etc)

I know some can be partially detected by checking $disp, but for example caledar entry display and general post display are both 'posts' and i need to know exactly.

Thank you alot.

2 Apr 03, 2006 15:13

To check to see if you're looking at search results, try this

if ($submit = 'Search';)

or

if (isset($s))


There aren't any calendar entry pages, as far as I know. The calendar just generates links to daily archive pages. Turn off extra-path info and then look at the url in various pages you want to know more about. You'll see something=something in the url and that will show you what variables you need to check. Then you can turn extra-path info back on.

3 Apr 03, 2006 22:14

*nod*
Thank you alot personman ;)

Indeed, after i wrote the post, i did something like


$is_search = $_GET["submit"];
$is_category =  $_GET["cat"];
$is_archives = $_GET["m"];

and it pretty much did it for me.


Form is loading...