CGBlog search results by category
Posted: Thu Jun 07, 2012 4:03 pm
There are four categories:
Category 1
Category 2
Category 3
Category 4
When a person searches the site, I need to return the results and go to detail page for that category. From my code below, as you can see it goes to the blog detail page and shows up fine, for all categories, what I want is something like the second code chunk,
THIS IS WRONG, I don't know what I'm doing here.
Please PM the estimated hour range to do this and the price per hour, gotta tell the client.
This link below has instructions for results based on language and category, the entire site is in english, I just want it filtered on category:
http://blog.arvixe.com/creating-a-multi ... ms-module/
Category 1
Category 2
Category 3
Category 4
When a person searches the site, I need to return the results and go to detail page for that category. From my code below, as you can see it goes to the blog detail page and shows up fine, for all categories, what I want is something like the second code chunk,
Code: Select all
{*start blog*}
{if $entry->module == "CGBlog"}
<li>{$entry->title} —
{capture assign="results"}{CGBlog action=detail articleid=$entry->modulerecord detailpage="blog" detailtemplate='searchresults'}{/capture}
<a href="{$articleURL}">{$articleTitle}—{$articleDate}</a></li>
{/if}
{*end*}
Code: Select all
{*start blog filter search*}
{if $entry->module == "CGBlog" & category == "Category 1}
<li>{$entry->title} —
{capture assign="results"}{CGBlog action=detail articleid=$entry->modulerecord detailpage="category1" detailtemplate='category1searchresults'}{/capture}
<a href="{$articleURL}">{$articleTitle}—{$articleDate}</a></li>
{/if}
{*end*}
This link below has instructions for results based on language and category, the entire site is in english, I just want it filtered on category:
http://blog.arvixe.com/creating-a-multi ... ms-module/