When searching within a single category, we use something like... <select class="searchdrops" name="incat" size="1"><option value="">All Services</option>{CATOPTIONS}</select>
I need to be able to display the category name on the the search results page. Using {INCAT} in search.tpl displays the cat id, I need to be able to display the cat name.
Currently I use a toplist to display the name...
<!-- BEGIN TOPLIST 1969 --> <CONFIG>categories[,]id[,]1[,]ascending[,]id={INCAT}[,][,]0[,]0[,]0[,]0[,][,]0[,]0[,][,]0[,][,][,]</CONFIG> {CATNAME} <!-- END TOPLIST 1969 -->
But this pruduces an error if there is no {INCAT} value.
Can we have a new variable to display the cat name in the search templates when incat searches are done... or can you think of any other solution?
I can rewrite them with a generic rule for $15, or you can rewrite each individual search to whatever you like on the SEO page if there are few enough for that to be practical.
Comments on incat searches
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
When searching within a single category, we use something like...
<select class="searchdrops" name="incat" size="1"><option value="">All Services</option>{CATOPTIONS}</select>
I need to be able to display the category name on the the search results page. Using {INCAT} in search.tpl displays the cat id, I need to be able to display the cat name.
Currently I use a toplist to display the name...
<!-- BEGIN TOPLIST 1969 -->
<CONFIG>categories[,]id[,]1[,]ascending[,]id={INCAT}[,][,]0[,]0[,]0[,]0[,][,]0[,]0[,][,]0[,][,][,]</CONFIG>
{CATNAME}
<!-- END TOPLIST 1969 -->
But this pruduces an error if there is no {INCAT} value.
Can we have a new variable to display the cat name in the search templates when incat searches are done... or can you think of any other solution?
Thanks
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
If this can't be done, can you make it so the above toplist when used in search template does not cause an error if there is no {INCAT} result.
Also, Paul, I sent you another email about the calendar (bookings) modifications work I wanted you to quote me on, did you get it?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I can do the category name on results page thing now for $20 (a {SEARCHCATNAME} template variable), or possibly get to it sometime free.
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
Yeah Paul, I'll have that.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
It's in 6.0.27 Beta 1 now (currently releasing, will be out within 30 minutes). Payment link: www.wsnlinks.com/index.php?...section=payamount&price=20
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
Thanks Paul, Payment Made via PayPal 81853767WH563051P
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
Links to search results pages, such as below...
search.php?incat=21&statesearch=East+Anglia&statecondition=like&submit=Search&action=filter&filled=1&whichtype=links
Is there a way to rewrite them automatically using htaccess ?
something like... /21/East-Anglia/
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I can rewrite them with a generic rule for $15, or you can rewrite each individual search to whatever you like on the SEO page if there are few enough for that to be practical.
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
Can you create a rewrite rule even of the statesearch has varied amounts of words?
if the URL has incat=21
can you match that to the category name so that the rewritten URL would be something like...
/restaurants/west-sussex/
?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
As long as all the category names you link have no special characters in them, yes, I can come up with something for that.
You'll need to write out the URL links directly as yoursite.com/restauraunts/west-sussex/ , it won't autoreplace the php url.