View Single Post
  #12  
Old 11-01-2010, 10:03 AM
 
peddler peddler is offline
 

Senior Member
  
Join Date: May 2007
Posts: 140
 

Default Re: page title info in 4.4.x

Quote:
My site that used 4.1.8 did this with no additional coding so I know it is possible.

Yeah, but 4.1.8 used a simple coding technique within the home.tpl file. With 4.4.1, there's a whole different approach, not the least of which is the 7KB file, function.get_title.php. Are you looking to do this without "additional coding", cuz you also wrote "I would like is to be able to hard code" ?? I'm a bit confused on that. It will take a coding change to make what you want.

Quote:
I have the home page title as I want it.

How did you do that? Did you hard-code a tpl file? If so, then a code change to the function.get_title.php file shouldn't affect your home page title. I can't say for certain without knowing how you coded it.

Refer to my post #1 and instead of using this line of code:

Code:
$title = str_replace("Home", "Your Domain Name", $title);


Use this:

Code:
$title = trim($title) .' - Your Domain Name' ;


Format that bit, - Your Domain Name , however you wish; whatever you want to put between the single-quote marks. (remember to verify that your home page title is un-changed)



Your final code will look like this:

Code:
// truncate $title = str_replace(" ", " ", $title); // title mod $title = trim($title) .' - Your Domain Name' ; // end title mod if (strlen($title) > $config['SEO']['page_title_limit'] && $config['SEO']['page_title_limit'] > 0) { $title = func_truncate($title, $config['SEO']['page_title_limit']); } // escape
__________________
Ralph
X-Cart v4.4.2 Gold (still buggy, some are new ones)
PHP 5.2.13
Reply With Quote