XF 2.0 in_array() in a template?

Jaxel

Well-known member
I am trying to do this:
Code:
<xf:option name="article_promote" value="1"
    selected="{{ in_array($thread->node_id, $xf.options()->EWRporta_article_forums) }}"
    label="{{ phrase('EWRporta_promote_to_article') }}"
    hint="{{ phrase('EWRporta_promote_to_article_hint') }}">

However, I am getting this error:
The function options may not be called in a template. Only functions with whitelisted prefixes are allowed.

Is there a way to do this in a template?
 
$xf.options() should just be $xf.options.

Also, you can pretty much just replace all -> with just ..
 
Back
Top Bottom