[SOLVED]Search module results help

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm

[SOLVED]Search module results help

Post by carasmo »

I don't know if this is an add on module question or a core module question, please pardon me if I'm incorrect in posting this here.

I'm using 1.11.2 of CMSMS and the latest of all other modules.

My issue is that I'm using a clone of Listit2 called 'ListIt2CloneSlider' to make a content slider system. It works great, but when I search for the content I don't want people to find the detail page of the ListitClone since I'm using just a summary template in Listit. This code below does not find it, but it returns empty results, not even $noresultsfound text is displayed. What I want is if there is text in the ListIt2CloneSlider that exists nowhere else on the site (not in any other page or module) then it returns the $noresultsfound. This code below doesn't do that. Any suggestions?

Code: Select all

{if $itemcount > 0}

{foreach from=$results item=entry}

{*these modules are not to be searched*}
{if (empty($entry->module)) || ($entry->module != 'CGBlog')}
{if (empty($entry->module)) || ($entry->module != 'ListIt2CloneSlider')}
<p>{$entry->title} &mdash; <a href="{$entry->url}">{$entry->urltxt}</a></p>
{/if}{/if}

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




{/foreach}


{else}
  <p><strong>{$noresultsfound}</strong></p>
{/if}
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm

Re: [SOLVED]Search module results help

Post by carasmo »

I believe I figured this out. But if I'm wrong I'll re-submit the help again.

Outside of the loop I did this:

Code: Select all

{if ($entry->module == 'ListIt2CloneSlider') && ($entry->module != 'CGBlog')}
<p>{$noresultsfound}</p>
{/if}
Post Reply

Return to “CMSMS Core”