Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > Website Design

Unregistered, Check out the Coder Battles in the Announcement and Game forums.

Website Design Forum for discussing flash, graphics, fonts, video and music! Have a question about how to implement something into your website? Ask here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-16-2008, 12:25 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 7,141
Last Blog:
Web slideshow in JavaS...
Credits: 1,097
Rep Power: 58
Xav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to behold
Send a message via MSN to Xav
Default How to Create a Template

What's the best way to create a template, where I just have the content in the individual files. The layout needs to be stored in separate file(s), so I can update the design/layout all in one place, and it affects all the pages.

So far I'm just using PHP "include" statements to add in the different parts of the page. Is there a better way (and NOT with a CMS)?
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 05-25-2008, 03:29 AM
TcM's Avatar   
TcM TcM is offline
Moderator
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,263
Credits: 0
Rep Power: 74
TcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud of
Default Re: How to Create a Template

When you say template, you mean the layout for example where the sidebar should be, where the header should be etc.. or the images?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-25-2008, 08:29 AM
Jordan's Avatar   
Jordan Jordan is online now
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 7,162
Last Blog:
Tramp Variables
Credits: 1
Rep Power: 20
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default Re: How to Create a Template

Before my CMS days I always created a header.php and footer.php. I included these on all pages after that and it was fairly easy to update and maintain. I think a better method is to make a header.php, footer.php and index.php. The index file would have a select/case statement and receive a variable input. Depending on the variable it would automatically load the page the user is requesting. It would also include your header/footer.php file only once.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Don't hesitate to ask any questions that you have! Check out our
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-25-2008, 12:56 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 7,141
Last Blog:
Web slideshow in JavaS...
Credits: 1,097
Rep Power: 58
Xav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to behold
Send a message via MSN to Xav
Default Re: How to Create a Template

You mean like www .website.co.uk/index.php?page=home or something? Wouldn't that mean there would only be one page for SEO, or not?
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-25-2008, 01:51 PM
TcM's Avatar   
TcM TcM is offline
Moderator
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,263
Credits: 0
Rep Power: 74
TcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud of
Default Re: How to Create a Template

No, if the spider crawls those links and the content is different, there will be more than one 'page'. vB without the SEO mod is just like that.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 05-25-2008, 01:58 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 7,141
Last Blog:
Web slideshow in JavaS...
Credits: 1,097
Rep Power: 58
Xav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to behold
Send a message via MSN to Xav
Default Re: How to Create a Template

And with the SEO mod?
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 05-25-2008, 02:31 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 7,141
Last Blog:
Web slideshow in JavaS...
Credits: 1,097
Rep Power: 58
Xav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to behold
Send a message via MSN to Xav
Default Re: How to Create a Template

Quote:
Originally Posted by Jordan View Post
I think a better method is to make a header.php, footer.php and index.php. The index file would have a select/case statement and receive a variable input. Depending on the variable it would automatically load the page the user is requesting. It would also include your header/footer.php file only once.
Why do you need the header.php and footer.php files? Can't I just have one main file - index.php - and within that I have the entire structure of the page - topbar, sidebar, footer at bottom - and just have a script block in the content section, to load the relevant content page, which contains only the content and no formatting?
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 05-25-2008, 02:52 PM
TcM's Avatar   
TcM TcM is offline
Moderator
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,263
Credits: 0
Rep Power: 74
TcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud of
Default Re: How to Create a Template

Quote:
Originally Posted by Xav View Post
And with the SEO mod?
It's just more Search engine friendly... nothing less nothing more.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 05-25-2008, 03:26 PM
Kaabi's Avatar   
Kaabi Kaabi is offline
Programming God
 
Join Date: Jul 2006
Posts: 884
Credits: 0
Rep Power: 14
Kaabi is on a distinguished road
Default Re: How to Create a Template

Being search engine friendly is important though. For my personal website I've used PHP Include, I didn't think there was another way.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If you are looking for high-quality, yet cheap, airsoft guns, then check out
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 05-25-2008, 03:29 PM
TcM's Avatar   
TcM TcM is offline
Moderator
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,263
Credits: 0
Rep Power: 74
TcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud of
Default Re: How to Create a Template

Well, for my websites I use TPL.. it's very easy once you get around it.

It's great to have various skins and easily switch/change between one and another.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
DoublyLinkedList from hell nolsen01 C and C++ 2 05-13-2008 02:55 PM
using Template function Chinmoy C Tutorials 4 04-03-2008 04:16 AM
Template Sites TVDinner Website Design 4 06-01-2007 10:32 PM
Create pluggin with Java nilshv Java Help 0 04-08-2007 09:27 AM


All times are GMT -5. The time now is 08:37 PM.

Contest Stats

Xav ........ 1097.16
MeTh0Dz|Reb0rn ........ 986.37
morefood2001 ........ 850.04
John ........ 841.93
WingedPanther ........ 684.54
marwex89 ........ 638.26
Brandon W ........ 492.36
chili5 ........ 292.12
orjan ........ 187.41
Steve.L ........ 183.02

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 79%

Ads