• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: CGBlog search results by category
PostPosted: Thu Jun 07, 2012 4:03 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Feb 08, 2007 6:11 pm
Posts: 481
Location: Florida
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,

Code:
{*start blog*}
{if $entry->module == "CGBlog"}

<li>{$entry->title} &mdash;
{capture assign="results"}{CGBlog action=detail articleid=$entry->modulerecord detailpage="blog" detailtemplate='searchresults'}{/capture}
<a href="{$articleURL}">{$articleTitle}&mdash;{$articleDate}</a></li>
{/if}
{*end*}


THIS IS WRONG, I don't know what I'm doing here.

Code:
{*start blog filter search*}
{if $entry->module == "CGBlog" & category == "Category 1}

<li>{$entry->title} &mdash;
{capture assign="results"}{CGBlog action=detail articleid=$entry->modulerecord detailpage="category1" detailtemplate='category1searchresults'}{/capture}
<a href="{$articleURL}">{$articleTitle}&mdash;{$articleDate}</a></li>
{/if}
{*end*}


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/


Top
 Profile  
 
 Post subject: Re: CGBlog search results by category
PostPosted: Fri Jul 13, 2012 11:35 am 
Offline
Power Poster
Power Poster

Joined: Sat Jan 22, 2005 11:19 am
Posts: 287
Not sure if it will help BUT check my forum topic http://forum.cmsmadesimple.org/viewtopic.php?f=4&t=61947

This topic was related to News but I'm sure with a bit of tweaking it could work with CGBlog.

The trick is to refine it to your requirements in the {if}{else} statements. Get the whole Search results then filter down to those you need for each module category.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner