show in all pages except the login page

Jake Bunce

XenForo moderator
Staff member
#2
Which template are you working with? This condition will probably work for you:

Code:
<xen:if is="{$contentTemplate} != 'login'">
	YOUR MESSAGE
</xen:if>
 

Jake Bunce

XenForo moderator
Staff member
#4
If {$contentTemplate} is available to your template then the condition will work. You can test it by pasting {$contentTemplate} into your template to see if it outputs anything.
 

kkm323

Well-known member
#5
If {$contentTemplate} is available to your template then the condition will work. You can test it by pasting {$contentTemplate} into your template to see if it outputs anything.
this seem to do half of the trick it works in the login page, but not affective in "site.com/login/login" this url appears if you enter any wrong data in the login form.

thank you for the great support by the way
 

Jake Bunce

XenForo moderator
Staff member
#6
Use this new code:

Code:
<xen:if is="{$contentTemplate} != 'login' AND {$contentTemplate} != 'error_with_login'">
	YOUR MESSAGE
</xen:if>
 

kkm323

Well-known member
#7
Use this new code:

Code:
<xen:if is="{$contentTemplate} != 'login' AND {$contentTemplate} != 'error_with_login'">
YOUR MESSAGE
</xen:if>
I think they should change your title from "Probably knows the answer" to "knows the answer" :D

Now is it also possible to add pages like "/account-confirmation" and/or "lost-password/lost" to the list?

thanks again
 

Jake Bunce

XenForo moderator
Staff member
#8
Use this syntax to specify a list of pages:

Code:
<xen:if is="!in_array({$contentTemplate}, array('login', 'error_with_login', 'register_confirm', 'lost_password'))">
	YOUR MESSAGE
</xen:if>
 

kkm323

Well-known member
#9
Use this syntax to specify a list of pages:

Code:
<xen:if is="!in_array({$contentTemplate}, array('login', 'error_with_login', 'register_confirm', 'lost_password'))">
YOUR MESSAGE
</xen:if>
I love what you did and I'm starting to learn a pattern, but how can i add 'lost_password' in a way that it also include anything within that directory
 
Top