Results 1 to 17 of 17
-
04-26-2004, 06:45 PM #1Junior Guru Wannabe
- Join Date
- Jul 2003
- Location
- Memphis
- Posts
- 30
Layout Question - Frams - VS - tables
I have a pretty basic web page design question.
I now know some the differences and pros and cons of frames versus tables.
I am now trying to make my web site in tables. It is a pretty basic website with navigation at the top and content in the bottom.
When I had done the website befoer I used frames at the top and botton - which made navigation easy. Now when I am trying to do the same thing in tables, how do I handle the navigation?
Will I just have to have all the same content on every page?
Thanks in advance.
-
04-26-2004, 07:01 PM #2Junior Guru Wannabe
- Join Date
- Apr 2004
- Posts
- 78
Well you can use magic php to do that. Just create footer.php and header.php and include those with everypage like this:
PHP Code:<? include('header.php') ?>
Normal html or php code goes here
<? include('footer.php') ?>
-
04-26-2004, 11:09 PM #3Junior Guru Wannabe
- Join Date
- Jul 2003
- Location
- Memphis
- Posts
- 30
What is magic php? - Functions built into PHP?
I have a recent version of PHP on this server.
-
04-26-2004, 11:17 PM #4Temporarily Suspended
- Join Date
- May 2002
- Posts
- 76
Just PHP, forget about the magic thing.
Create a file called header.php and put the navigation code there.
Create a file called footer.php and put the footer code there.
Create a file called mypage.php and place the following code in it.
PHP Code:<? include('header.php') ?>
Normal html or php code goes here
<? include('footer.php') ?>
Upload the 3 files and this will do the job. Simple!
-
04-26-2004, 11:33 PM #5Hmmm....
- Join Date
- Apr 2003
- Location
- UK
- Posts
- 2,341
What is magic php? - Functions built into PHP?
I have a recent version of PHP on this server.███ ServeYourSite
███ Web hosting done right
███ Shared, Reseller and Dedicated web hosting
███ An Easy Web Presence Company
-
04-26-2004, 11:35 PM #6Hmmm....
- Join Date
- Apr 2003
- Location
- UK
- Posts
- 2,341
Anyway, you can use SSI and a virtual include. Save as .shtml or add the extension you wish to use with the below to using Mime Types
<!--#include file='filename.htm'-->███ ServeYourSite
███ Web hosting done right
███ Shared, Reseller and Dedicated web hosting
███ An Easy Web Presence Company
-
04-26-2004, 11:41 PM #7Junior Guru Wannabe
- Join Date
- Jul 2003
- Location
- Memphis
- Posts
- 30
how will this effect web spyders as related to keyword indexing?
Do they analyse PHO content, or is it an issue?
-
04-26-2004, 11:56 PM #8Junior Guru Wannabe
- Join Date
- Jul 2003
- Location
- Memphis
- Posts
- 30
I have been playing with this nifty new *magic*
And have made a page work - now my question is thing - I see when I look at the source the web page produces, that it is literally combining 2 php pages to return one.
On the spidering issue - this is obviously server side, so my guess it the spiders dont care one way or another. Is this correct?
The one thing I am curious about (remember I am mainly ad admin, so save the flames.)
Is do I need to make sure that what is returned is a valid HTML page? - Because I made the following:
header.php:
<strong>
This is the header <BR>
</strong>
Footer.php:
<strong>
<BR>This is the footer
</strong>
mypage.php:
<? include('header.php') ?>
Normal html or php code goes here
<? include('footer.php') ?>
And it produces the following:
<strong>
This is the header <BR>
</strong>
Normal html or php code goes here
<strong>
<BR>This is the footer <BR>
</strong>
My question is - does it matter that things like </HTML> are not in the page that is generated?
Thanks for the responses.
-
04-27-2004, 12:13 AM #9Temporarily Suspended
- Join Date
- May 2002
- Posts
- 76
you can make the <html> tags appear...
<html>
<head>
<title>My lovely site</title>
</head>
<body>
<? include('header.php') ?>
Normal html or php code goes here.
<? include('header.php') ?>
</body>
</html>
You can use as many times as you want the include() PHP function, as many times and where you want also. You can include .php and also .html or .txt, etc.
Spiders won't recognize the difference.
-
04-27-2004, 12:42 AM #10Junior Guru Wannabe
- Join Date
- Jul 2003
- Location
- Memphis
- Posts
- 30
makes sense
I guess that makes sense, because they would ignore those tags anyway eh?
Also I guess this could be used as some kind of security mechanism? - If you wanted to hide some stuff eh?
-
04-27-2004, 12:47 AM #11Temporarily Suspended
- Join Date
- May 2002
- Posts
- 76
No tags are ignored... HTML will be displayed in the same way as if you wrote all straigt fwrd without include()...
Test it on your site to see the results.
-
04-27-2004, 01:07 AM #12Junior Guru Wannabe
- Join Date
- Jul 2003
- Location
- Memphis
- Posts
- 30
spiders wouldnt index those tags anyway
I just meant spiders wouldnt index those tags anyway if they werent there. As long as the page renders correctly.
-
04-27-2004, 01:10 AM #13Temporarily Suspended
- Join Date
- May 2002
- Posts
- 76
Oh... ok, thats true
-
05-01-2004, 01:08 AM #14Newbie
- Join Date
- Apr 2004
- Location
- Here, most likely not where you are.
- Posts
- 12
Originally posted by pmoduk2
Are you serious?
-
05-01-2004, 03:11 AM #15Hmmm....
- Join Date
- Apr 2003
- Location
- UK
- Posts
- 2,341
My question is - does it matter that things like </HTML> are not in the page that is generated?
I suggest coding your whole page, then certain areas that will be the same on every page, copy the page into a new file, and use an include to include that section.
If your page is made up of tables, make sure you don't miss any tags out. If you want to make an example of explain in full detail just ask and I will███ ServeYourSite
███ Web hosting done right
███ Shared, Reseller and Dedicated web hosting
███ An Easy Web Presence Company
-
05-01-2004, 11:01 AM #16Newbie
- Join Date
- Mar 2004
- Posts
- 27
Just another tips : use Dreamweaver templates to create the whole page. Basically, instead of including the files in php, you hard coded the header and footer in your page and create an editable region for your content. It is easier that including the includes files.
-
05-01-2004, 12:08 PM #17WHT Addict
- Join Date
- Apr 2004
- Posts
- 167
The great thing about include() is that it will be easier to edit all pages at once.
I mean:
If you have an include file just with "Copyright 2004". And next year you change this file to "Copyright 2005" all pages will be updated, and you don't need to change 1 by 1.
The same with the header or footer.
You can also include files into files that are included.