RSS Feed/News template: if does not work if $var does not exist?

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
24,670
Points
823

Reputation:

Code:

Code:
<xf:if is="{{$forum.node_id}}">
      do something
    <xf:else />
      do something
    </xf:if>

This works as long I have $forum;
but it does not work, when there is no forum.

How can I do an isset() in a template?

Continue reading...
 
Status
Not open for further replies.
Top