Need some advice/suggestions on template syntax

ardeare

New Member
I've coded a small php template parser, so templates can be easily parsed, and the variables within the templates are like \[code\]{variable_name}\[/code\] e.g.\[code\]<title>{title}</title>\[/code\]Can you suggest me possible if/else statement syntax?I've thought of doing something like:\[code\]{if {logged_in}: TRUE}You're logged in...{else}You're not...{/if}\[/code\]and...\[code\]{if {logged_in}: TRUE}You're logged in...{/if}\[/code\]The above demonstrates basic if/else template syntax (it checks if the variable logged_in == true), but since I'm more of a coder then designer, was wondering if I can have your input (so designers can easily understand the syntax without knowledge of server-side coding).Cheers!
 
Back
Top