News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

figuring out whether you are on main page or not

Started by ldk, May 05, 2004, 02:14:34 PM

Previous topic - Next topic

ldk

Hi. I'd like to add something to the main template that says:

if (USER_IS_ON_MAIN_PAGE)
    echo '.....';
else
    echo '.....';

So if the user is on the main, top-level, page of the forum it does one thing.  Else it does another.

How to I detect this?

Thanks for any tips you have.
see SMF put to the test at http://www.craftster.org/

[Unknown]

The easiest way would be to say...

if (empty($_REQUEST['action']) && empty($context['current_board']))

-[Unknown]

Advertisement: