Html include

Html include

am 24.07.2007 17:46:01 von John

Hello,


I have an html page and want to include and html menu that I use on
all pages. What is the best way to do this? A php include command?

Re: Html include

am 24.07.2007 19:24:47 von a.nony.mous

John wrote:

> I have an html page and want to include and html menu that I use on
> all pages. What is the best way to do this? A php include command?

That is what I do.

include "/common/menu.php";

Mine is a php script because it does processing based on what page(s)
called it. If yours is a static menu, it can be pure HTML.

--
-bts
-Motorcycles defy gravity; cars just suck

Re: Html include

am 26.07.2007 01:09:59 von Paul Furman

Beauregard T. Shagnasty wrote:

> John wrote:
>
>
>>I have an html page and want to include and html menu that I use on
>>all pages. What is the best way to do this? A php include command?
>
>
> That is what I do.
>
> include "/common/menu.php";
>
> Mine is a php script because it does processing based on what page(s)
> called it. If yours is a static menu, it can be pure HTML.

In case John doesn't know...

include "/common/menu.php";
?>

Re: Html include

am 26.07.2007 02:19:40 von Nick Marks

I think you are getting it wrong... if you want to include it onto a
HTML page then you will have to do it manually ... Include will not
work on HTML pages.. Alternatively you can use frames or IFrames

For more help Email me
http://www.design2host.net

Re: Html include

am 26.07.2007 02:46:43 von Paul Furman

Nick Marks wrote:

> I think you are getting it wrong... if you want to include it onto a
> HTML page then you will have to do it manually ... Include will not
> work on HTML pages.. Alternatively you can use frames or IFrames

Hmm, OK you are right!
A php file will parse html though and can include perhaps any extension
on a ascii file, so:

INDEX.PHP:

... blah
... blah
include "menu.txt";
include "body.txt";
?>



Probably someone will have another solution.

--
Paul Furman Photography
http://www.edgehill.net/1
Bay Natives Nursery
http://www.baynatives.com

Re: Html include

am 26.07.2007 03:12:42 von a.nony.mous

Nick Marks wrote:

> I think you are getting it wrong...

You think /who/ are getting it wrong? You must be new here. Normally,
we quote the relevant part of the post we are replying to, as I am doing
here. Oh, you don't think this is *Google* do you?

> if you want to include it onto a HTML page then you will have to do it
> manually ...

There's another way?

> Include will not work on HTML pages.. Alternatively you can use frames
> or IFrames

Yes, you /are/ new here. Google for "frames are evil"

> For more help Email me
> hxxp://www.design2host.net

No thanks. Not if that is your best work.



--
-bts
-Motorcycles defy gravity; cars just suck

Re: Html include

am 26.07.2007 03:22:54 von Bergamot

Nick Marks wrote:
> if you want to include it onto a
> HTML page then you will have to do it manually ... Include will not
> work on HTML pages..

Ever hear of a little thing called SSI?

> Alternatively you can use frames or IFrames

Both bad choices.

> For more help Email me

The blind leading the blind...?

--
Berg

Re: Html include

am 26.07.2007 16:26:30 von Chaddy2222

On Jul 26, 11:12 am, "Beauregard T. Shagnasty"
wrote:
> Nick Marks wrote:
> > I think you are getting it wrong...
>
> You think /who/ are getting it wrong? You must be new here. Normally,
> we quote the relevant part of the post we are replying to, as I am doing
> here. Oh, you don't think this is *Google* do you?
>
> > if you want to include it onto a HTML page then you will have to do it
> > manually ...
>
> There's another way?
>
> > Include will not work on HTML pages.. Alternatively you can use frames
> > or IFrames
>
> Yes, you /are/ new here. Google for "frames are evil"
>
> > For more help Email me
> > hxxp://www.design2host.net
>
> No thanks. Not if that is your best work.
>
>
>
Ha, you reckon that's bad, I know of a bloke, well I presume it's a
bloke who keeps telling us (people who are new-ish to CSS to back to
HTML 3.2 as he / she / it thiks it (3.2) gives you more control then
what you get with CSS. But I thaught at the time it was the most
rediculous thing I had read. Oh and I stil do think that way about
HTML 3.2, I mean how can people still pay $50 per hour for old code
that will not work (as well) or at all on modern web browsers.
--
Regards Chad. http://freewebdesign.awardspace.biz