2019-08-29, 01:14 PM
I know that there is no conditional template options in 1.8 and below, but it would be very handy if there were simple variables that would help with more dynamic templates.
For example:
$mybb->template['loggedin'] = "yes"; // or no
$mybb->template['script'] = THIS_SCRIPT;
This way we can use CSS to hide and display html.
It's not perfect, but saves having to hard code simple html depending on various conditions.
For example:
$mybb->template['loggedin'] = "yes"; // or no
$mybb->template['script'] = THIS_SCRIPT;
This way we can use CSS to hide and display html.
<div class="d-none loggedin_{$mybb->template['loggedin']}">
This can only be seen by logged in members.
</div>
<div class="d-none page_{$mybb->template['script']}">
Global templates can display page specific content.
</div>
It's not perfect, but saves having to hard code simple html depending on various conditions.