-
Templates in php
One thing I've never undestood in templates it how people use them in php. For example if I create a:
- match reports page id call it reports.php
and if I created a news page i'd call it:
- news.php
But I see some websites just have one template page ie: page.php an then use it to call out the section they want ie:
page.php?section=news
or
page.php?section=reports
Then depending on what's called out the way the information is called out is changed in the way the page is laid out. An example being:
http://www.greenocktelegraph.co.uk/w....php?sec=terms
and
http://www.greenocktelegraph.co.uk/w...t&id=editorial
Can anyone please explain and possibly post links to any tutorials
Thanks
Chris
-
¬.¬ shoooo...
Logic without the fatal effects.
All code snippets are licensed under WTFPL.
-
SitePoint Wizard
What I presume is that the provided website works on includes bases.
It would check value of section var provided through GET, and include corresponding "template" or php page to show.
Purpose of templating is separating php code and presentation.
I would suggest you to search this forum a little bit about it, I'm sure it was discussed many times before.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks