♦View your IP Address: (none)♦Members♦Help♦Bookmark♦NewHOT♦110mb♦Alexa Ranking♦
♦Study♦InfoTech♦Security♦Entertainment♦Tourism♦Career♦Social♦Business♦Science♦
♦California-USA: ♦
Basics of Conditional SSI
Products / Services
This guide introduces the very basics of conditional SSI with some simple examples.
Conditional SSI "Flow Control" allows you to test for certain variables and display content depending on what those variables are. To better explain it consider the following scenario:
If your browser is Chrome:
"Great Chrome!"
or else if your browser is Internet Explorer:
"IE suck!"
otherwise:
"display no message"
End
The correct syntax takes this basic format:
<!--#if expr="expression" -->
"something here"
<!--#elif expr="expression" -->
"something else here"
<!--#else -->
"something different here"
<!--#endif -->
To show this in a working example we are going to display a simple message depending on what day of the week it is.
First we configure the time format for the full weekday name, then we check what day of the week it is and attach the appropriate message:
<!--#config timefmt="%A" -->
<!--#if expr="$DATE_LOCAL = /Monday/" -->
I hate mondays!
<!--#elif expr="$DATE_LOCAL = /Friday/" -->
Yeeeahhh, it's Friday!
<!--#else -->
No comment!
<!--#endif -->
Conditional SSI is where it gets exciting as it allows you to add a great deal of dynamism and personalisation to your pages and so is important to learn and experiment with. More examples & applications are accessible through the main SSI page.
It's also important to check out the conditional expressions page to learn what "operators" can be used with conditional SSI.
View more...- Introduction to Server Side Includes (SSI).
- Enable SSI On Your Server via .htaccess file.
- Include Command of SSI.
- Echo Command of SSI.
- Date Command of SSI.
- Config Command of SSI.
- Exec Command of SSI.
- Other Basic Commands of SSI.
- SSI Conditional Basics.
- Conditional Expressions of SSI.
- Choose colors for your website.
- 10 Reasons Why People Don't Visit Your Web Site.
- 10 Profitable Reasons To Add A Discussion Board Or Chat Room To Your Web Site.
- 10 Legal Commandments for Your website.
- A sample for comments include Google Search results on Web, Videos, Blogs.
- Add Favicon to further promote your website.
- Website Design and content, technical guidelines and basic principles.
- List of common MIME types and their corresponding file extensions.
- What is a RSS Feed ? How to make Static Feeds and Dynamic Feeds.
- Resources design website for webmasters.
♦Email to your friend ♦Email to us ♦Get updates by Email ♦View updates on Web ♦Follow us on Twitter ♦Google Safe Browsing ♦McAfee SiteAdvisor ♦Diagnostic this page ♦Noreton SafeWeb ♦DrWeb ♦Technorati Links ♦Save to del.icio.us ♦Add to del.icio.us ♦Digg This! ♦Share on Facebook ♦outside.in: geotag this story ♦Discuss on Newsvine ♦Stumble It! ♦Add to Mixx!♦
If you would like to submit your website for FREE or advertise your own webpage(s) on our webpages, please enter Terms of Service webpage to send your request. Thank you!