CMS Made Simple Forums

Tag search and CGBlog
Page 1 of 1

Author:  Gregor [ Sun Dec 08, 2019 12:19 pm ]
Post subject:  Tag search and CGBlog

Based on the description in this topic I modified the 'Search Results template' to:
<h3>{$searchresultsfor} &quot;{$phrase}&quot;</h3>
{if $itemcount > 0}
  {foreach from=$results item=entry}
  <li>{$entry->title} - <a href="{$entry->url}">{$entry->urltxt}</a> ({$entry->weight}%)</li>
    {if $entry->module == 'CGBlog'}
        {CGBlog action="default" summarytemplate='blogSummary_LeftRight' articleid=$entry->modulerecord detailpage='logboek'}

<p>{$timetaken}: {$timetook}</p>

The code above stops with a fatal error after 30seconds. Is the snippet above the way to use the CGBlog summary template to show the to the search related records, or do I have to mix the code from the summary template into the search results template?

Author:  Gregor [ Fri Dec 13, 2019 10:20 am ]
Post subject:  Re: Tag search and CGBlog

gentle kick...

Author:  velden [ Fri Dec 13, 2019 10:57 am ]
Post subject:  Re: Tag search and CGBlog

Although I doubt it will cause the fatal error it seems a little strange to call CGBlog's default action (which usually is a summary action) and supplying an articleid parameter.

I'd expect it should be the 'detail' action and detail template.

Author:  Gregor [ Sat Dec 14, 2019 6:27 am ]
Post subject:  Re: Tag search and CGBlog

Thanks Velden.

These parameters seems to be in conflict with each other.

Basically what I what to achieve is show the summary template for each cgbolg article record that matches the search. {CGBlog action="default" summarytemplate='blogSummary_LeftRight'} will probably perform action on all cgblog records.

Any suggestions on how to only show the searched records in the summarytemplate view?

Author:  velden [ Sat Dec 14, 2019 3:00 pm ]
Post subject:  Re: Tag search and CGBlog

I quickly scanned CGBlog help and didn't find a way to provide multiple article ids to this module.

I guess you will have to create a detail template to mimic the behavior of the summary template (though this can be a challenge because the detail template isn't usually used to start and end a series of items (opening and closing a div for example) and it also will be harder to implement a left/right solution (the template name makes me think your doing something like that).

Pagination will also be a problem.

Author:  Gregor [ Mon Dec 16, 2019 7:14 am ]
Post subject:  Re: Tag search and CGBlog

You're right on the left / right lay-out.

I think the solution would be to collect the multiple id's based on the search and feed these to the cgblog summary template. Easier said than done....

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group