Hi,
I have a script that currently pulls the file name from a url and returns the result to a template tag that can be used in the page Title Tag.
so http://www.mysite.com/directory1/directory2/directory3/some-web-page.html
will result in the output Some Web Page. However, what I'd like to have is this:
Directory1 Directory2 Directory3 Some Web Page
Here is the current code in the script. What is the best way to accomplish this? (I'm not a programmer)
function sefTiger_metatitle()
{ global $config;
$filepag2 = basename($_SERVER['REQUEST_URI'], ".html");
$sefTmetatitle='';
$pre= strrpos($filepag2, "-page");
if ($pre !== false)
////// Add in a stripper to take non numbered page out of titles
{$rest = substr($filepag2, -5);if ($rest=='-page'){$filepag2=substr($filepag2,0, -5);}
$sefTmetatitle=str_replace( $config["seo_url_seperator"],' ', $filepag2);
$sefTmetatitle= ucwords ($sefTmetatitle);}
return $sefTmetatitle;}