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

if xenforo option show some code

PoLiZe

Well-known member
#1
Hi people, i'm making a add-on but i dont know that

how i need put in a template for check a option on xenforo..


Without the template i need make:

XenForo_Application::get('options')->languageltp;


but in the template how i need make?

<xen:if ?? how?


Sorry for my bad english :(
 

Indigo

Active member
#2
I believe you would use {$xenOptions.languageltp} in your template, to get the value of the languageltp option. Conditionals would be like:
Code:
<xen:if is="{$xenOptions.languageltp}">
some html
</xen:if>
 

Indigo

Active member
#4
That would throw you a syntax error due to misplaced quotes. The entire condition should be within the double quotes.
Code:
<xen:if is="{$xenOptions.languageltp} == 'es'"> ... </xen:if>