Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Phpld and page titles

Status
Not open for further replies.

nichols

Technical User
May 24, 2001
92
GB
Does anyone have any experience with phpld templates and page titles. We have a site which is made up from these templates i.e .tpl files.

Our problem is that everything is based around a master file which calls up other templates like header.tpl index.tpl etc. This works fine however the page title tag is on the master page which is set to :

<title>{$_config.website_name}</title>

Which appears to be linked to a variable in the config.php file as below:

$_config = array();

This means that all pages have the same title which is obviously not great for search engine optimisation.

Does anyone have any ideas how we could get round this?

apoligies for my vague description of the problem. I have inherited this and I am trying to learn it on the job.

If anyone can help it would be greatly appreciated.



 
it's easy enough to change the tag to another, or to make the tag respond dynamically. the difficulty seems to be from where you will get the page title? will you store the different titles in a database? how will you determine which title to use for which page?
 
This is where I need help. My thoughts were to have some form of variable on the page which a script in the master page would pick up and use as the page title. The only problem is there appears to be a php file and tpl file for each page i.e. index.php and index.tpl and I don't know how they interact.

Is there a way I could do it via the mysql database?


Thanks for you reply
 
how do you identify each page at the moment?
 
ok. so it looks like you are using some url rewriting in the first instance, and some query string parsing in the second.

somewhere you should have some code that processes incoming urls to determine what to show your users. this was what I was really after. can you locate this and paste it in?
 
I can't see any code that does this. Do you know what it is that I should be looking for? I have looked in the index.php, index.tpl, master_page.tpl files and I can't see anything. Do you know of any tutorials or resources on phpld templates?

Sorry that I can't be much more help!

Thanks for you help so far.
 
I'll have a look. Thanks for all your help on this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top