Jump to the post that solved this thread.
Solved: 6 Years, 8 Months, 3 Weeks ago How do I use a if and else on template editor?
#1
Solved: 6 Years, 8 Months, 3 Weeks ago
I want to check a variables value to do a if/else on the template editor but none of it seems to work.
I tried using this:
<if {$memprofile['uid']} == 2 then><div>show this</div></if>
Didn't work.

I tried the normal PHP if:
if ($memprofile['uid'] == 2) {
    echo "show this";
}
But didn't work either.
Does anyone know a way that works?

Cheers.
Reply
#2
Solved: 6 Years, 8 Months, 3 Weeks ago
In order to use conditionals in templates, you need to install the Template Conditionals plugin.
Reply
#3
Solved: 6 Years, 8 Months, 3 Weeks ago
Oh thank you!
I didn't know was needed a plugin, it works now.
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)