Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: Neol on March 06, 2007, 02:21:55 PM

Title: Is the value of $context['current_action'] persistent?
Post by: Neol on March 06, 2007, 02:21:55 PM
In other words: if a user visits an action page like index.php?action=profile then the value of $context['current_action'] is set to 'profile', right?

After that, when the user navigates away to a non-action page, like index.php or index.php?board=9.0, is 'profile' still in $context['current_action'], at least until the user visits another action page?
Title: Re: Is the value of $context['current_action'] persistent?
Post by: codenaught on March 06, 2007, 03:29:26 PM
$context['current_action'] is only set when there is an action set in the url. Such as index.php?action=profile. As soon as there is no longer an action in the url, it is no longer set. So when inside a board, the variable is not set. However $context['current_board'] is set when inside a board and topic. And $context['current_topic'] is set when inside a topic.
Title: Re: Is the value of $context['current_action'] persistent?
Post by: G6™ on March 06, 2007, 03:29:46 PM
More or less yes, but the forum index will show as the action [Viewing the Forum index] and when Inside the forum it will show [Viewing the topic "what topic it now might be"], and for the action when they are in a specific board it will show as [Viewing the board index of "forum here"]]