|
|
|
|
![]() ![]() |
Jul 13 2005, 09:16 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 240 Joined: 9-July 05 Member No.: 9,213 |
Even with PHP includes for menus and such, changing the layout of a site can be a big deal. Is there a way to have 1 page for the layout and multiple pages for the contents? The site in question can be seen here. All of the text inside the larger cell would be the contents.
That way I would just have to update the single page for layout, and it would be included into each of the separate content pages. Does this make any sense to anyone else, or am I not explaining what I mean well enough? |
|
|
|
Jul 14 2005, 12:45 AM
Post
#2
|
|
|
Ephesians 6:10-17 ![]() Group: [MODERATOR] Posts: 1,917 Joined: 22-June 05 From: The World of Gentoo Member No.: 8,528 |
I think i know what you're talking about. If not then i'll try anyways. I'ma suggest using the get method.
CODE /* put this where you want the content from another page to show */ <?php include(&page.html); ?> /* if you want php pages to show just change $page.html to $page.php */ And in the uri you'd define $page by http://example.org/index.php?page=name_of_document For multiple content values add a '&' after every value: http://example.org/index.php?page=name&page2=name2 Hope this helped... This post has been edited by Johnny: Jul 14 2005, 12:50 AM |
|
|
|
Jul 14 2005, 05:53 AM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 240 Joined: 9-July 05 Member No.: 9,213 |
Awesome! That's exactly what I was looking for. The only problem is finding a way to make the index page the same. I tried redirecting cerb.trap17.com to cerb.trap17.com/index.php?page=home.html, but for some reason the redirector didn't recognize question marks. Check out cerb.trap17.com if you don't get what I mean.
|
|
|
|
Jul 14 2005, 10:18 PM
Post
#4
|
|
|
Ephesians 6:10-17 ![]() Group: [MODERATOR] Posts: 1,917 Joined: 22-June 05 From: The World of Gentoo Member No.: 8,528 |
Sorry, i dont understand what you mean, but your site seems to be running smoothly, so i'm guessing everything is ok now?
As for the contact page, i suggest not posting your email address like that, since there are web bots that surf the web for stuff like that. Thus bringing in spam. I'd suggest making a php mail form with an anti-spam feature. |
|
|
|
Jul 15 2005, 04:24 PM
Post
#5
|
|
|
Newbie [Level 3] ![]() ![]() ![]() Group: Members Posts: 45 Joined: 18-June 05 From: Norway Member No.: 8,410 |
Another option you may want to consider, is to use iframes. At DynamicDrive you can get a free script that creates an iframe that will resize with the content. You can specify the width of the iframe, and then the height adjusts to the length of the content that will be showed inside the frame, which means no iframe scrollbar. This works really well because you can't even see there's an iframe, and your layout won't have to reload every time you enter a new link. In that way, you only need one page for the layout, just like you wanted. You can keep the content separate from the layout. To simplify it even more, you could use one separate css file for your site's design and colour information. You can just link to your css file on each page of your site. It can be done like this in case you didn't know:
<link rel="Stylesheet" type="text/css" href="yourcssfile.css"> Hope this helps. Using this solution, it will always be an easy fix changing the design and layout of your entire site |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 11th October 2008 - 12:16 AM |