Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP Layout Setup, Help
Old 05-09-2005, 09:56 PM PHP Layout Setup, Help
BoardTng's Avatar
Novice Talker

Posts: 14
Trades: 0
Ok Ive figured out im going to do my layout in php and use the Include command, instead of my old way ...Iframes. uhgh. I have some questions though. I think I basically understand how it works, But I have a few questions. Say you make a navigation with the links Images, Staff, and About. , And on the main template you use the include command to include that page there. How would I make a new page for the images that still have the include navigation page on it. I figure you would have type it in on every page you make. that would be almost as much as linking each page in regular html. I hope you guys understand what Im trying to say.

THis may help further. In Iframes in the link you made. you use the target= command in the link to tell the link to goto the designated iframe. Im trying to figure out the way php works in this matter.

BoardTng
BoardTng is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-10-2005, 05:22 AM
stoot98's Avatar
Ultra Talker

Posts: 427
Name: Stuart
Location: Glasgow, Scotland
Trades: 0
This may not be the BEST way to use the include() but this is how i use it.

I would make the main template with spaces for the nav bar and the content, the spaces being empty cells of a frame. The easy way to do it is to then just make the page as you normally would with the nav bar but then once youve done it cut ALL the code that appears in the nav bar's cell (leaving the CELL's code there so as not to mess up the display) then paste it into a new document and where the code used to be just put <?php include('navbar.php') ?> and it, essentially, works as if the code in the included file was just dumped into the navbar cell.

I hope this makes sense, as i say it might not be the best way to use them but it seems to work for me.

Stoot
stoot98 is offline
Reply With Quote
View Public Profile
 
Old 05-10-2005, 09:01 AM
BoardTng's Avatar
Novice Talker

Posts: 14
Trades: 0
Seems to me this will work. Another question is. Say for the navigation with the links. How would I make a new page? Just use the original template (with the includes), add the content needed and save it such as contact.php?
BoardTng is offline
Reply With Quote
View Public Profile
 
Old 05-10-2005, 11:54 AM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
yep that's about it.

I usually set up a page with all the includes in place and any other common features even the DTD, some of the meta info , the style sheet line etc are as includes. Call it layout.php then open it in the editor and do save as
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to PHP Layout Setup, Help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13184 seconds with 12 queries