View your IP Address: (none)♦MembersHelpBookmarkNewHOT110mbAlexa Ranking

Vietnamese | English

StudyInfoTechSecurityEntertainmentTourismCareerSocialBusinessScience
World Times♦Vietnam:
♦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... 
Select Vietnamese to find other information or service from Vietnamese site(s).

Email to your friendEmail to usGet updates by EmailView updates on WebFollow us on TwitterGoogle Safe BrowsingMcAfee SiteAdvisorDiagnostic this pageNoreton SafeWebDrWebTechnorati LinksSave to del.icio.usAdd to del.icio.usDigg This!Share on Facebookoutside.in: geotag this storyDiscuss on NewsvineStumble 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!

©2004- ESI Portal ™®

Products / Services

(\__/)
(=^.^=)
(")_(")
ESI Portal
HOME
Top News
Online Tools
Online Translator
WYSIWYG Editor
Source Code Editor
Real Time Tool
2D Map Tool
3D Map Tool
Forex News
Online Shopping
Watch Videos
Listen Songs
Find Jobs
For Webmasters
About Us
Privacy Policy
Terms of Service
Contact Us
Live chat with us