Forum Moderators: open

Message Too Old, No Replies

HTML on CD, no includes?

includes in html browsed locally on disk not appearing...

         

planetfall

2:03 pm on Aug 9, 2005 (gmt 0)

10+ Year Member



all my extensions are shtml, i have a site i want to be available on cd, this site has a menu that is an include on all the pages, but its not showing up on the pages when browsed locally...

i tried <!--#include file="menu.shtml" --> and <? include("menu.shtml");?>

there has got to be a simple way to do this, anyone know?

thanks!

jwwright

BlobFisk

2:13 pm on Aug 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi planetfall and welcome to WebmasterWorld!

Includes like this are done by the server which is not available when you ship on CD. You may need to do a manual search and replace of your include call with the HTML it includes...

kaled

3:02 pm on Aug 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There MIGHT be a firefox extension that can do this. In theory, it would be straightforward for a browser it interpret basic #include instructions.

Kaled.

planetfall

3:35 pm on Aug 9, 2005 (gmt 0)

10+ Year Member



thanks guys, i managed to emulate my included menu by using an iframe tag, and that works very well.

but there are other issues that make this not a great solution, the site i'm putting on cd has many sections, and each section has its own submenu, includes of course, so i would have to make i frames for all of those, and some page copy/content is also included, because pieces appear elsewhere in the site.

i use dreamweavermx2004 and iframes screw up the wysiwyg feature, making page content hard to get to for editing...

seems like local includes would be an obvious handy thing that would have many uses, not just for servers... its kind of ridiculous that its not simply in the os!

my only other option is to hardcode all the section submenus and redundant copy/content... defeats the purpose of includes doesnt it?

choster

5:01 pm on Aug 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A better way to accomplish this is to use a program like HTTrack to download the rendered HTML page-- after the includes are processed. Short of compiling a webserver to autorun locally, you're not going to be able to run includes or any other dynamic site software from disk.