creating a 'scrolldown' box? - Post...

User 463058 Photo


Ambassador
1,086 posts

Here are a couple pages that might be helpful:

http://www.sitepoint.com/article/save-hours-ssis/

http://www.htmlgoodies.com/beyond/webma … hp/3473341

The little bit of html code you need to insert into your pages can be handled in VSD. The question is whether or how the server will handle things. Normally, you would end page names with .shtml instead of .html or .htm when using SSI, but I don't suppose VSD will let you do this. Also, you've indicated that the site is an established one which you've taken over, so it would be best to avoid having to change any page names anyway.

Assuming your server supports SSI, then, as mentioned in the Sitepoint article, you may be able to have your server configured to parse pages even if they end with just .html or .htm.

The basic idea is the sever will parse the pages when they are requested by a browser. If the server finds the SSI include code in the requested page, it will replace that code with the contents of the file that include code points to.

The include code itself looks something like this:

<!--#include virtual="/includes/something.htm"-->


In this example, the include code will be replaced by the content of something.htm, which is located in the folder, includes, located in the root of the site. While this example places the include file in a folder called "includes", that isn't necessary. You can place the file wherever you like as long as the include code in you page points to the correct location.

Since the include code is replaced with the content of the file pointed to, that file doesn't need anything that's already part of the page calling it. Your html page will already have all the header code and the opening and closing body tags, so that stuff can be left out of "something.htm" or whatever you want to call it.

Imagine a complete page of code. You cut a section out of it. Then you put the two together again to make a complete page. Same idea with includes.
User 597929 Photo


Registered User
1,332 posts

Sounds very promising, thanks for the tips and the links. I'm all in favor of learning new stuff!

I'll have to digest this for a bit. My host provider runs Linux and prides themselves on offering most everything so I can't imagine they wouldn't support this.
"You can't be a real country unless you have a beer and an airline - it helps if you have some kind of a football team, or some nuclear weapons, but at the very least you need a beer." -- Frank Zappa

Visit Spinland Studios: http://www.spinland.biz
User 130978 Photo


Ambassador
3,025 posts

Yeah, I used server side includes all the time until I learned php...I would never build a site without some kind of "include" method now...

Here's a helpful link that shows you how to use htaccess to enable SSI if host does not:

http://www.javascriptkit.com/howto/htaccess4.shtml

...also you can add a line in that htaccess folder to actually have your server parse html pages (rather than renaming all to shtml) for SSIs. I admit I have not tried that...

I usually named my includes (not the html page, but the included files) as .txt files. Remember what is in the "include" is repeated verbatim in the rendered page. If you have not tried includes, jump in...they will make your life soooo much better. If you have an include for the header and footer of all pages, you only need to edit that one file when making changes...rather than opening each and every page...

Melanie

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.