You are here:  » Space in title after ':'

Support Forum



Space in title after ':'

Submitted by mikecdprice on Mon, 2011-09-05 17:49 in

Hello,

How would I put a space into the title and title on page like brand: to have a space in title and on html page. It just looks cleaner that way. How would I do that?

Like:

Brand: Sony

Category: Blu Ray Players

Thank you,
Mike

Submitted by support on Mon, 2011-09-05 18:01

Hi Mike,

There's an easy mod to remove the search prefix altogether in this thread however if you do wish to keep merchant / category / brand in the title then you could easily do this as follows; look for the following code at line 320 of search.php:

    $header["title"] = htmlentities($q,ENT_QUOTES,$config_charset);

...and REPLACE with:

    $header["title"] = htmlentities($q,ENT_QUOTES,$config_charset);
    $header["title"] = str_replace(":",": ",$header["title"]);

Cheers,
David.
--
PriceTapestry.com

Submitted by mikecdprice on Mon, 2011-09-05 19:06

Hello David,

That works like a charm. Is there a way to add keyword or word group after?

Like:

Brand: Sony Products

Submitted by support on Tue, 2011-09-06 07:59

Hi Mike,

Sure, try something like this:

    $header["title"] = htmlentities($q,ENT_QUOTES,$config_charset);
    $header["title"] = str_replace(":",": ",$header["title"]);
    if ($parts[0]=="brand"])
    {
      $header["title"] .= " Products";
    }

Cheers,
David.
--
PriceTapestry.com