Link to home
Start Free TrialLog in
Avatar of Amanda Watson
Amanda WatsonFlag for Australia

asked on

Can I change a small piece of code to add a generic page title to all shop pages??

I am looking for a small hack to add to all shop page titles -  something like "Promotional Products"  I want the same thing at the front of all my page titles, so I just want to add a small change in the code to do this?
So for example on this page http://www.adzimpact.com.au/shop/industrial-trade/tape-measures/torch-tape-measure-detail

I the browser title I just want to ad "promotional products |" to the beginning.
I want to do this to all shop pages, they will all start with the same title then have their own titles follow
Does anyone know how to do this?
I am using VirtueMart 1.1.5 and Joomla 1.5.23/

Thanks,
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

That is not recommended for search purposes.  Google thinks each page should have a unique title.  Seeing "promotional products |" at the beginning of all of your page listing in search is kind of mind-numbing and un-informative.
Avatar of Amanda Watson

ASKER

Well I am just going by how joomla 1.5  was setup previously – it had those words in the title tag previously and now it doesn’t and the traffic has fallen. I know whenever I am looking for promo products I just go to Google and type promotional products I don’t look for individual items because quite often my clients don’t know what promo products they want – depends on cost a lot of the time because they are often purchase in bulk. Sometimes I will type something like promotional products and pens or cups if I know the client wants specific items because if I just went to google and typed cups or pens I would end up with a lot of sites that are not relevant and we only want companies that sell promo products so yes I think this is a VERY important phrase to have on each page. This should make a big difference however because the description tags were also unique and now we don’t have those we might not be able to get the stats back to where they were anyway but should be some improvement. Ideally I would like the unique description tags in there too….but don’t think that’s going to happen ?

Is there a way in Joomla 2.5 to have Promotional products on each page, as welll as the unique page title?
Avatar of Member_5340450
Member_5340450

libraries/joomla/application/application.php
      line 1099
      Add
      $title = "Promotional Products: " . $title;
Great, would that add it to the beginning or the end of the page title - I think adding it to the end may be less of a nuisance?
$title = "Promotional Products: " . $title; 

Open in new window

That will add it to the beginning.  PHP will take the literal string, then concatenate the information in $title.  With the concatenated string, PHP will replace the contents of $title.

If you want to add the literal string (words) to the end, you might use something like this:
$title .= " | Promotional Products";

Open in new window

The dot-equal notation cause string concatenation to the end of the string named at the left of the equal sign,
Hi There,
I did as was instructed :
libraries/joomla/application/application.php
      line 1099
      Add
      $title = "Promotional Products: " . $title;

But you can see here: http://www.adzimpact.com.au/shop/business-essentials 
there is no change to the page title?
ASKER CERTIFIED SOLUTION
Avatar of Member_5340450
Member_5340450

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Great that worked beautifully
Thank you
That worked beautifullly - thank you so much