Alright so what I am trying to do is make this sub navigation button send you to a different page if you are not logged in on the forums.
'sub_download' => array(
'title' => 'Downloads',
'href' => $scripturl . '?page=page255',
'show' => $user_info['is_guest'],
else
'href' => $scripturl . '?page=downloads',
'show' => true,
),
I tried this going off how I would do it in java but this isn't java lol and I am lost.
Please help!
you can't use conditionals like that in the middle of the array...
'sub_download1' => array(
'title' => 'Downloads',
'href' => $scripturl . '?page=page255',
'show' => $user_info['is_guest'],
),
'sub_download2' => array(
'title' => 'Downloads',
'href' => $scripturl . '?page=downloads',
'show' => !$user_info['is_guest'],
),
You can use inline conditionals though.
'sub_download' => array(
'title' => 'Downloads',
'href' => $user_info['is_guest'] ? $scripturl . '?page=page255' : $scripturl . '?page=downloads',
'show' => true,
),
AH! Right... I always forget about those.
That's why you're a developer and I'm a manager. lol....