Web Hosting Talk







View Full Version : Template Question...


_eft
01-13-2006, 09:33 AM
I would really be grateful if someone could help me with my little question.

Whenever i make a site I always have one sort of template, where i add my php code so i dont have to create hundreds of pages...

Is this the best way? or are there better ways? Or is the best way to create loads of pages?

I am worried incase i am not getting picked up on search engines properly as i am using .php?

Any help/advice would greatly be appreciated.

Thank you.

liquid
01-13-2006, 04:03 PM
You could just do include('filename'); for each of the files based on the page you want loaded making it easier to change. I dont really think it makes that much of a difference in what extension you use .php or .htm etc

mentavius
01-13-2006, 04:42 PM
From my understanding, just coding in .php isn't a problem with search engines in itself. The problem comes in when you are passing a lot of parameters in the url (as some content management / message board systems do)

So this would be fine
http://www.somedomain.com/page1.php (http://www.webhostingtalk.com/#)

But this might be a bit trickier, and not do as well in the listings, depending on the search engine.
http://www.somedomain.com/page1.php?id=5&somevariable=ths&morevariableshere=4674823746 (http://www.webhostingtalk.com/#)

I use PHP includes all the time in my sites, as it makes maintenance much quicker and doesn't leave me with those long 'ugly' URLs.

Just my two cents :)

_eft
01-14-2006, 12:40 PM
Thank you very much.

It would be just a filename such as "example.php" with content in it, as you said it saves alot of time, its just with all the search engines updating etc.. i thought it would have stopped my content being read somehow..

Thanks again,
EFT