190 likes | 664 Views
Server-Side Includes (SSI). an Introduction and Demonstration presented by: Sean Conklin CMS Project Student-Assistant MWF mornings WA 406, x4200 firstname.lastname@example.org. What exactly is SSI?.
E N D
Server-Side Includes (SSI) an Introduction and Demonstration presented by: Sean Conklin CMS Project Student-Assistant MWF mornings WA 406, x4200 email@example.com
What exactly is SSI? • Server-Side Includes is a feature of all major Web Server Applications (Microsoft IIS, Apache, Netscape iPlanet, Etc.) that allows for the simple including of modular web content onto HTML web pages via the Server. The machine itself processes (or “parses”) SSI upon visitor request of an HTML page having SSI commands.
“Modular” • SSI enables modular web page materials • Modular: breaking-down into separate parts (ex: cars, computers) • Modular = Efficiency • Quicker implementation (easy copy-paste) • Ease of modification
What will we use it for? • We are using SSI to insert (“include”) a standard header onto all key pages of the CSUH website, including main school and department web pages. • The reasons for the standardization include: consistency, modernization, & accessibility
Why SSI? • SSI is EASY to learn and use -- simple 1 line commands go a long way! • SSI makes CONSISTENT-looking pages that realize the goal of our project. • SSI makes FUTURE updates much easier by centralizing the included content. That means only 1 person per server will need to make template version updates, not dozens of webmasters updating hundreds of pages.
What does SSI look like? • SSI has several commands, but only 1 that applies to us – the “INCLUDE”: <!--#include virtual=“/PATH/FILE_NAME.EXT” --> • The INCLUDE command inserts the contents of a file (ex: text-based template file) onto HTML web pages. Includes also work for graphics and can actually be embedded (include within include)!
EXAMPLE! CONTENTS: 1 - sample.shtml …… Sample Page 2 – header.txt ………… Header Include 3 – footer.txt ………… Footer Include 4 – [output] ……………… Output in Internet Explorer EXPLANATION: The page file on the left INCLUDES the header and footer files above, which when called by a visitor, causes the web server to put them together, thus the output below
How do I get it working? • SSI must first be enabled on the server that you are using. It might already be! • SSI, by default, works only on pages named with the extention .shtml, but this can be changed to work on .html, etc. • The set-up process will vary depending on which Web Server Application being used.
Where to go for information? • http://www.csuhayward.edu/includes (This page shows the exact commands that you should use) THANK YOU! Sean Conklin CMS Project Student-Assistant MWF mornings WA 406, x4200 firstname.lastname@example.org