Forum Moderators: open

Message Too Old, No Replies

dreamweaver, ssi, and templates

what am i doing wrong!

         

ckhagen

4:54 pm on Sep 4, 2003 (gmt 0)

10+ Year Member



Hi all.

I'm just now forcing myself to learn templates and I'm also trying to add ssi to my list.

Deal is, I've got this site that I'm doing for someone and I'm kinda using it to "experiment"

What I've done so far...
made a table in a document labled nav.htm that contains my nav bar.

made a template file that contains an ssi referring to the nav.htm doc. and 1 single editable region for content.

made a page called index.htm and applied the template to it.

Well...
When I did that last item the ssi nav bar showed up just fine (in dreamweaver) so I added some gibberish to the editable regiong.

Now, when I test it (in the browser, on the server or from DW) only the editable region with the gibberish shows up. Where did my nav bar go?!?!

Help?

Thanks.

candice

Bowdii

7:19 pm on Sep 4, 2003 (gmt 0)

10+ Year Member



well, first, why are you using templates and ssi, use one or the other. You should include your nav-bar in your template... Or just use SSI.

So your nav bar is not coming up because its server side. View it live and it should be there.

seeber01

9:27 pm on Sep 4, 2003 (gmt 0)

10+ Year Member



When using SSI, there are a couple things to remember

1. make sure your include file does not have the beginning and end <html><body></body></html>

You are only including a small section of data within an already existing shtml file that has the above codes in it.

2. You need to name your main files with an extension of .shtm or .shtml to be viewed offline by dreamweaver

3. Dreamweaver may require an .ssi extension for your include file (it's been a while since I've used the ssi
function in Dreamweaver)

4. There are reasons to use both a template and ssi ...

Use a template for any part of your site design and content that will not change for any pages within your site

Use ssi or the Dreamweaver library function for content items that may remain the same on portions of the site, but not the entire site

5. Your host may require pages to end in .shtm or .shtml in order to process ssi ... some hosts do not allow ssi. If you don't want to run the .s pages, or your host won't allow ssi, use the Dreamweaver library function. It's kind of the same thing (when you update the library file, it auto updates to the pages where the tag is referenced, like ssi ... however it is already a part of the page, so the server doesn't have to parse it before it's viewed), but you can name your page extensions in any acceptable convention .htm .html .php whatever ...

Hope this helps.

Bowdii

2:28 pm on Sep 5, 2003 (gmt 0)

10+ Year Member



seeber01 - sorry, I should of been more clear with my response. I was thinking since ckhagen is using SSI for a nav bar, which is most likely going to be on every page, why bother using it, just include it in your template.

I never knew that about the library in dreamweaver, thanks!