TinyPortal
Development => Support => Topic started by: spagetiokillers on December 08, 2012, 08:06:29 PM
I created new links on my forum in the navigation center and pointed them to some articles i made so the link extension is /index.php/page,1.html . Im trying to figure out what the action is here exactly so that while im viewing the page the button is selected instead of the home button. I am using v2.0.2, i hope this is enough information needed to help me.
Edit: for more information on this im looking for the action for this code
elseif ($context['current_action'] == 'page,1.html')
$current_action = 'Feautres';
The $context['current_action'] variable is directly connected to what action=something in the URL is set to. So you can't check for 'page' in the same way, because it has nothing to do with what action is set to. So you just need to check for $_GET['page'].
if(isset($_GET['page']) && $_GET['page'] == 1)
{
$current_action = 'features';
}
Quote from: IchBin™ on December 10, 2012, 03:36:34 AM
The $context['current_action'] variable is directly connected to what action=something in the URL is set to. So you can't check for 'page' in the same way, because it has nothing to do with what action is set to. So you just need to check for $_GET['page'].
if(isset($_GET['page']) && $_GET['page'] == 1)
{
$current_action = 'features';
}
Yes i realized that it shouldnt have been action i just didnt know what would be used because it wasnt setup like page=1 so thats why i was confused. But thanks for the help i will try it in a moment to see if it works and ill get back to you thanks!
Alright it works im just having an issue with another mod now. making it show that a nonexistent button is selected even though the mod isnt installed anymore