hi,
got my categories similar like this ...
- movie action
- movie adventure
- movie crime
is it possible to search (browser/url) all categories that starts with "movie" ?
thanks
alecs
Hello Alecs,
I'm working on enabling logic operators in the query at the moment - as soon as that's ready I'll let you know and you'll be able to search, for example, category AND games AND (nintendo OR xbox OR sega OR sony).
Cheers,
David.
hi david ...
is it possible to get an extra searchform for the current category a user visits ?
Hi Alecs,
You could perhaps add an extra "Search this category" button to the search form - that would be straight forward. To have a go with this, first REPLACE your html/searchform.php with the following new version:
<div class='searchform'>
<form name='search' action='<?php print $config_baseHREF ?>search.php'>
<input type='text' name='q' id='q' size='35' value='' />
<input type='submit' value='<?php print translate("Search"); ?>' />
<?php
if ($parts[0]=="category")
{
<input type='hidden' name='category' value='".htmlentities($parts[1],ENT_QUOTES,$config_charset)."' />
<input type='submit' name='submit' value='Search This Category' />
}
?>
</form>
</div>
And to compliment that, the appropriate value of $q would have to be constructed at the top of search.php. In that file, look for the following code around about line 4:
$q = (isset($_GET["q"])?tapestry_normalise($_GET["q"],":\."):"");
...and REPLACE that with:
$q = (isset($_GET["q"])?tapestry_normalise($_GET["q"],":\."):"");
if ($_GET["submit"]=="Search This Category")
{
$q = "category:".$q;
}
Hope this helps!
Cheers,
David.
Hi Alecs,
Sure - using a query of:
category:movie
...should do the trick
Cheers,
David.