[RSS Feed/News] Setting XF1 template variable based on nested ternaries

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
Hi,

I'm trying to set a variable in an XF1 template to the result of some nested ternaries. I have it working in XF2, but can't get it to work in XF1.

Here's what I have:

Code:

<xen:set var="$nodePart">{{ $forum.node_id ? $forum.node_id : ($thread.node_id ? $thread.node_id : -1) }}</xen:set>

But it's not resolving that variable to the result of the ternary, it's resolving it to the string literal: {{ $forum.node_id ? $forum.node_id : ($thread.node_id ? $thread.node_id : -1) }}

I've...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom