Not a bug Cannot use curly style template function in <xen> tags


Well-known member

Example code:

<xen:checkboxunit label="{$preparedOption.title}" name="{$fieldPrefix}[{$preparedOption.option_id}]" hint="{$preparedOption.hint}">
   <xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][display][posts]" label="{xen:phrase 3ps_usergroup_ranks_in_posts}" {xen:checked $preparedOption.option_value.display.posts}>
     <xen:select name="{$fieldPrefix}[{$preparedOption.option_id}][display_position][posts]" value="{$preparedOption.option_value.display_position.posts}">
       <xen:option value="0">{xen:phrase 3ps_usergroup_ranks_over_avatar}</xen:option>
       <xen:option value="1">{xen:phrase 3ps_usergroup_ranks_under_avatar}</xen:option>
       <xen:option value="2">{xen:phrase 3ps_usergroup_ranks_above_username}</xen:option>
       <xen:option value="3">{xen:phrase 3ps_usergroup_ranks_under_user_title}</xen:option>
   <xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
     <input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
     {xen:raw $editLink}
Notice that the compiler will throw a fit on line 2 about xen:checked being there. Replace xen:checked with xen : if, xen:escape or any other functions, it will also throw a fit.

I also noticed that all admin templates that require the use of functions uses the input tag instead of xen : option, so this might be a suggestion instead.
Last edited:


Well-known member
it's just

Take a look at the template "option_template_captcha" which is probably similar to what you need
Last edited:


XenForo developer
Staff member
Of course you can't - that's not how the template syntax works... You have to write valid HTML-esque syntax.