• 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  [ 6 posts ] 
Author Message
 Post subject: Tag search and CGBlog
PostPosted: Sun Dec 08, 2019 12:19 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Mar 23, 2006 9:25 am
Posts: 1872
Location: The Netherlands
Based on the description in this topic https://forum.cmsmadesimple.org/viewtopic.php?f=4&t=80640 I modified the 'Search Results template' to:
\$1:
<h3>{$searchresultsfor} &quot;{$phrase}&quot;</h3>
{if $itemcount > 0}
<ul>
  {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'}
    {/if}
  {/foreach}
</ul>

<p>{$timetaken}: {$timetook}</p>
{else}
  <p><strong>{$noresultsfound}</strong></p>
{/if}

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?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Tag search and CGBlog
PostPosted: Fri Dec 13, 2019 10:20 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Mar 23, 2006 9:25 am
Posts: 1872
Location: The Netherlands
gentle kick...


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Tag search and CGBlog
PostPosted: Fri Dec 13, 2019 10:57 am 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 3174
Location: The Netherlands
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.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Tag search and CGBlog
PostPosted: Sat Dec 14, 2019 6:27 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Mar 23, 2006 9:25 am
Posts: 1872
Location: The Netherlands
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?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Tag search and CGBlog
PostPosted: Sat Dec 14, 2019 3:00 pm 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 3174
Location: The Netherlands
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.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Tag search and CGBlog
PostPosted: Mon Dec 16, 2019 7:14 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Mar 23, 2006 9:25 am
Posts: 1872
Location: The Netherlands
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....


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 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:  
A2 Hosting