MG 2.2 Media gallery display condition

mjda

Well-known member
Is there some kind of template conditional/display condition I can use that shows whether someone is viewing a page in the media gallery or not? I want to only show the media navigation tab if someone is actually viewing the media gallery. Otherwise, I want it hidden.
 
Solution
In case anyone else is wondering how to do this, here is the solution.

Change the display condition in the Media navigation item from this:

Code:
$xf.visitor.canViewMedia()

to this:

Code:
$xf.visitor.canViewMedia() AND $xf.reply.section == 'xfmg'
In case anyone else is wondering how to do this, here is the solution.

Change the display condition in the Media navigation item from this:

Code:
$xf.visitor.canViewMedia()

to this:

Code:
$xf.visitor.canViewMedia() AND $xf.reply.section == 'xfmg'
 
Last edited:
Solution
Top Bottom