if xenforo option show some code

PoLiZe

Well-known member
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 :(
 
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>
 
So,
HTML:
<xen:if is="{$xenOptions.languageltp}" == "es" > some html </xen:if>
that is right?
 
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>
 
Top Bottom