Hi all, Im a PHP newbie, so this should be easy for you! I have a script that uses a global header to create page title, meta and keywords: <title>{if $pagetitle ne ""}{$pagetitle} - {/if}{$site_name}</title> <meta name="description" content="{if $pagetitle ne ""}{$pagetitle} - {/if}{if $metadescription ne ""}{$metadescription}{/if}" /> <meta name="keywords" content="{if $pagetitle ne ""}{$pagetitle},{/if}{if $metakeywords ne ""}{$metakeywords},{/if}{$site_name}" /> So the homepage pagetitle is mysite.com and all other pages titles show up as - Example page content - mysite.com Is there a way i can make it so that the homepage title and the meta data are unique from all of the other pages? Hope you understand me. Thanks, Scott
Would that not the apply the $pagetitle across all the other pages too? From what i understand, the script i am using just references the header.tpl amongst other things to auto generate the pages, which is why i dont know where to add my unique page title. I am a complete php newb, so i kinda need it in leymans terms
Heres and example, to get your started... <?php if(basename(__FILE__) == 'index.php'){ $meta = 'index.php meta...'; } else { $meta = 'default meta for all other pages...'; } ?> PHP: