I have coded a small php template parser, so the template can be easily parsed, and within templates {variable_name}
example
& lt; Title & gt; {Title} & lt; / Title & gt;
Can you suggest me if / else statement syntax?
I have thought of doing this:
{if {logged_in}: TRUE} You are logged in ... {else} You are not ... {/ If}
and ...
{if {logged_in}: TRUE} You are logged in ... {/ if}
Shows the above original if / other template syntax (it checks whether the variable is logged == true), but since I am doing more of a designer, I was thinking that I myself The input can be obtained (hence the designer can easily understand syntax without knowledge of server-side coding Es).
Cheers!
Sure.
Here is:
& lt ;; If ($ logged_in):? & Gt; You are logged in ... & lt ;? Else:? & Gt; You are not ... & lt ;? Endif? & Gt;
The best syntax ever
As you can see, the opening and closing tags have been slightly altered.
But nothing needs to be parsed altogether - just include
this file!
BTW, your output
& lt; Title & gt; & Lt ;? = $ Heading? & Gt; & Lt; / Title & gt;
Comments
Post a Comment