You are here:  » Hide result in search field + drop "sectionID:" from H1

Support Forum



Hide result in search field + drop "sectionID:" from H1

Submitted by peterb on Thu, 2012-03-01 18:50 in

Hi David,

I would like to drop the search result being displayed in the search field (ie. blank after search).

Also I would like the "sectionID" and the colons removed from my H1 page heading.

If you look at this page
{link saved}

you can see it says "category:Beanies:" in the search (how do I remove that).

and also my H1 says "category:Beanies:", (how do I make that just say "Beanies".

Regards
Peter

Submitted by support on Fri, 2012-03-02 09:41

Hi Peter,

To remove the default value of the search box, look for the following code in html/searchform.php

<input type='text' name='q' id='q' size='35' value='<?php print (isset($q)?$q:""); ?>' />

...your version may be slightly different, however all that's required is to remove the value='..' e.g.

<input type='text' name='q' id='q' size='35' />

From looking at your site I think you have resolved the H1 issue and the title, but for completeness, in the distribution the first part of the title is generated directly from $q by the following code at line 320@

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

...so this can be replaced with:

$title_q = str_replace(array("merchant","category","brand",":"),"",$q);
$header["title"] = htmlentities($title_q,ENT_QUOTES,$config_charset);

Cheers,
David.
--
PriceTapestry.com

Submitted by peterb on Thu, 2012-03-08 16:48

Thankyou that worked perfecctly