CSS Menu not Dynamic??? - Page 2

User 1997052 Photo


Registered User
85 posts

Hi Eric,

thank you!

I looked it up and include is part of SSI... so I am on the right track :D thanks!

but it does not seem to work

this is the code <?php include_once("menu.inc"); ?>

and the file menu.inc is in the dsame folder on my hd

but the menu bar is empty
can it be that I cannot preview this?

thank you
Daniel
Daniel P.
Germany
the answer is 42
User 562592 Photo


Registered User
2,038 posts

first, I forgot to mention that your html file (the non menu one) has to be named ".shtml" This ending tells the server that there is an include that needs to be found.

Second, your .shtml file where you want the menu to appear should be this code:

<!--#include virtual="navigation.html" -->

Of course you replace "navigation.html" with the actual file name of your html source.

This should get you going on the right track.
The philosopher has not done philosophy until he has acted upon the mere conviction of his idea; for proof of the theory is in the act, not the idea.

My Web Development Company: http://www.innovatewebdevelopment.com (Created with Coffee Cup Software).

My Personal Website: http://www.EricSEnglish.com

User 562592 Photo


Registered User
2,038 posts

One more thing. You can only preview your menu on your server. In other words you must have it uploaded somewhere to see the menu (hence server side). :D
The philosopher has not done philosophy until he has acted upon the mere conviction of his idea; for proof of the theory is in the act, not the idea.

My Web Development Company: http://www.innovatewebdevelopment.com (Created with Coffee Cup Software).

My Personal Website: http://www.EricSEnglish.com

User 1997052 Photo


Registered User
85 posts

Hi, thank you very much...

am trying it right now

what I am not understanding is that the index.html must be index.shtml then, too ???

no problem??

Thank you soo much

Daniel
Daniel P.
Germany
the answer is 42
User 1997052 Photo


Registered User
85 posts

and

#include virtual="navigation.html"

is shown where the menu should behttp://homeofhomebusiness.com/templatehohb.shtml

???

this is the code

</div><!-- -->
<div id="navigation" style="WIDTH: 21%; HEIGHT: 723px">
<h2>Navigation</h2><!-- -->#include virtual="navigation.html"
</div>


Thank you!!

Daniel
Daniel P.
Germany
the answer is 42
User 1997052 Photo


Registered User
85 posts

<!-- --> is "nevermind" in html, isn't it???????

Daniel
Daniel P.
Germany
the answer is 42
User 627930 Photo


Registered User
5 posts

Daniel P,

Stephen, since I read your post I am experimenting with php

were has menu.inc to go? Same folder? And plain textfile .inc?


menu.inc can go anywhere you would like. If it's in a directory at the
main level called "include", you could say

<?php include_once("include/menu.inc"); ?>


And menu.inc is just a plain text file. You can call it menu.txt if you like. (You have to set Coffee Cup to be able to open .inc files in the options or preferences or soemthing like this.)

Good luck!
User 364143 Photo


Guest
5,410 posts

Your host also has to offer server side includes.
CoffeeCup... Yeah, they are the best!
User 1997052 Photo


Registered User
85 posts

HI,

nothing worked until I called the files .php

now it works

thank you

Daniel
Daniel P.
Germany
the answer is 42
User 627930 Photo


Registered User
5 posts


nothing worked until I called the files .php


Um...oops, sorry I forgot to mention that. (I actually forgot it.)

SE

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.