Forum
Use Perch_layout_var in If statement
Hi Guys.
Is it possible to do something like this?
if (perch_layout_var('text') == 'X') {
show something
} else {
show something else
}
I have some small alterations to my nav between pages and I don't want to have to use 2 different nav includes.
Cheers
Sure:
With Perch functions, passing
true
as the final argument causes the value to be returned rather than echoed.Cool thanks