• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

New div class only on a thread hmm

Wuebit

Well-known member
#1
Is there a way I can get this class
PHP:
<div class="anime30">
To only work on the thread page as in the page you are viewing right now
But here is the problem I need to add it in the PAGE_CONTAINER right under
PHP:
<div class="pageContent">
Thanks
Edit is there an IF condition or something like that for xenforo?
 

Wuebit

Well-known member
#3
PHP:
{$controllerName} == 'XenForo_ControllerPublic_Thread' AND {$controllerAction} == 'Index'
Thanks Kier I was reading your other post about IF conditions just now :)
But am still unsure on how to use that code. Could you explain alittle more for me please.
Thanks

Edit do you mean like this
PHP:
<xen:if is="{$controllerName} == 'XenForo_ControllerPublic_Thread' AND {$controllerAction} == 'Index'"><div class="anime30"><xen:if>
 

Kier

XenForo Developer
Staff member
#4
If you want to attach the class to an existing <div />, do this:
HTML:
<div class="{xen:if '{$controllerName} == "XenForo_ControllerPublic_Thread" AND {$controllerAction} == "Index"', 'anime30'}">
If you want to insert the whole <div /> conditionally, do this:
HTML:
<xen:if is="{$controllerName} == 'XenForo_ControllerPublic_Thread' AND {$controllerAction} == 'Index'"><div class="anime30"></xen:if>