Hey everyone. The website I am currently working on uses template and php files. I would like to have it so each page has its own unique title and meta tages. Currently, each php file calls a standart background.tpl file that has the <head> and some other information in it, the php file also calls the unique page tpl file which has the page information on it. The problem with this is that each page uses the same title and meta tags. Anyone know how I can fix this so each tpl file has a unique title and meta tags?? any help is appriciated and certainly worth some green rep points!!
You need to define a title for each of your php pages and than call those titles as a php code from your background.tpl file
thanks WTM, from my background.tpl or from each individual pages tpl? (for example, bluewidget.tpl, greenwidget.tpl..etc)
Create variables for title, and meta tags. In each page it would look like this: $title = 'This is the title of this specific page'; $meta_tag1 = 'blah blah'; include('background.tpl'); PHP: Remember you must define the variable before you include the file. EDIT: You also need to edit background.tpl: Remove the title and tell it to echo the title variable (ex. if title is <title>Welcome</title> ... change to <title><?php echo $title; ?></title>) Do the same for meta tags