Forums

This topic is locked

Templates vs SSIs

Posted 24 Sep 2004 20:24:04
1
has voted
24 Sep 2004 20:24:04 Shell Richer posted:
Hi, I am developing (webmaster) what will be a large school site which various people will be working on. I intended to use nested templates but an article from this site says that templates should be used for sites under 50 pages, SSIs for over 50. I have no experience with SSIs and not much time. Does anyone have experience using either of these for a larger web site? Thanks, Shell

Replies

Replied 27 Sep 2004 11:01:19
27 Sep 2004 11:01:19 Lee Diggins replied:
Hi Shell

I use SSI where possible as DW templates can become corrupted and awkward, my latest has just corrpted itself - oh joy!

SSI gives you the abilty to divide up the content of a web page, you might have header, footer, content, navigation, copyright etc., this way you can create one file for the header and 'include' it in any page you choose, so if you have changes to make site-wide you can edit the one header file and immediately all pages that have that one page 'included' will display the modified header.

A tip for you if you're using ASP, don't use the file extension of .inc, make all your include files have the extension of .asp.

If you have any other questions, post back.

Digga

Sharing Knowledge Saves Valuable Time!!!
Replied 27 Sep 2004 21:51:20
27 Sep 2004 21:51:20 Jeremy Conn replied:
SSI is by far my preferred method... much cleaner code, easier to make changes, and no need to rely on Dreamweaver to make the changes.

Just my 2 cents, but I have ditched templates altogether - too many times I have had it cough half way through and then I had to hand-edit the rest of the pages via Notepad.

<b>Connman21</b>
www.conncreativemedia.com
<b>DEVELOPMENT SETUP</b>
DWMX 2004 Studio
Web Server: IIS5
DB: Access2003/SQL2000
OS: XP Pro
Language: ASP/VB
Replied 28 Sep 2004 01:21:23
28 Sep 2004 01:21:23 Jeremy Conn replied:
SSI are 'merely Server Side Includes'... you can still use PHP with SSI.
All that Includes do is allow you to dynamically insert a piece of code (a copyright, for instance) into many different pages.
See the example below (in PHP):

EXAMPLE CODE:
Copyright 2004 | &lt;a href="www.conncreativemedia.com"&gt;Designed by Conn Creative Media&lt;/a&gt;

Say that you want that copyright to show up on every page. Rather than placing that code on every single page, you could instead create a file called 'copyright.php' which ONLY contains that code. Then, on each page where you want to 'include' that copyright code, simple place this:

&lt;?php include("copyright.php" ?&gt;

Then, when that page is loaded by the browser, it simply grabs the contents of that 'include' and places into that spot... so your browser would not display
&lt;?php include("copyright.php" ?&gt; ------ it would replace it with -------- Copyright 2004 | &lt;a href="www.conncreativemedia.com"&gt;Designed by Conn Creative Media&lt;/a&gt;

The benefit of this simple technique is for something like a copyright, a nav menu, or any other item that should show up on all or many site pages - to change it on all pages where the include is placed, all you need to do is change the 'copyright.php' file, and then re-upload that to the server.

Anyway, feel free to do whatever works best for you, but I just wanted to make sure you understood what SSI was... good luck.

<b>Connman21</b>
www.conncreativemedia.com
<b>DEVELOPMENT SETUP</b>
DWMX 2004 Studio
Web Server: IIS5
DB: Access2003/SQL2000
OS: XP Pro
Language: ASP/VB

Reply to this topic