Forum Moderators: coopster

Message Too Old, No Replies

Navigation Bars down the Sides

How do you do it using include files

         

dvduval

12:40 pm on Jul 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Someone asked me a question in a private message. While the answer seems easy to me now, it was a mystery to me for a while. Here is the question:
I was browsing your forums and noticed your post on making a dynamic site in 2 mins, that helped me out greatly as I am new to this. Thanks, But I was wondering If I could ask you a question.

How do I create a website which has the navigation bars etc down the sides rather than at the top, I just wanted a logo on the header file and maybe some info down the right. Would I use frames?

My Answer: Don't use frames. Lay out your page in html using tables. Now highlight and cut everything BEFORE the unique content and create a new file called header.php and highlingt everything AFTER your unique content and call that footer.php.

dvduval

12:41 pm on Jul 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The "dynamic site in two minutes" threade is here:
[webmasterworld.com...]

vincevincevince

2:07 pm on Jul 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My Answer: Don't use frames. Lay out your page in html using tables.

I'd say don't use tables for layouts - use DIV

dvduval

3:04 pm on Jul 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



vincevincevince,

I will remain netral on your recommendation of <div> tags, but I think this person should learn one thing at a time, and therefore, use what is familiar first. If tables is more familiar, use tables. If div is more familiar, use div. The main thing right now is they need to lay out the page and then split it into the three sections:
header, content and footer.

MWpro

4:56 am on Jul 11, 2003 (gmt 0)

10+ Year Member




My Answer: Don't use frames. Lay out your page in html using tables. Now highlight and cut everything BEFORE the unique content and create a new file called header.php and highlingt everything AFTER your unique content and call that footer.php.

Good advice for them. However, I don't think using all those files is a good idea - it is unnecessary when you can have it just all in one. You can do it simply with echoing variables.

Example (with heredoc syntax):
$header = <<<END
header html here
END;

$footer = <<<END
footer html here
END;

and then in the page just include that file and use
<?php echo $variablename;?>
or you can use the shorthand for echoing
<?=$variable?>