I have a results page that displays the search results.
The search searches through the news module and displays the title as a link to the page.
My problem is that I have different details page for each news category and when the user hits a link on the search results page the user should be able to go to the news item and see it displayed with the corresponding news_detail_template. As it is now the news details opens up in a default template and that is not good enough.
For clarification : News category A --- News detail template A
News category B --- News detail template B
News category C--- News detail template C
Isn't there a way to just skip this default template which opens all the links in the search results in. And make the links to open up like:
News category A --- News detail template A
News category B --- News detail template B
News category C--- News detail template C
Here is a sample of my code in the results page:
Code: Select all
{if $itemcount > 0}
<ul class="search-ul">
{foreach from=$results item=entry}
{if (strpos($entry->urltxt, "http://") !== false)}
{else}
<div class="search-results-box-item search-results">
<li><a href="{$entry->url}">{$entry->urltxt}</a> ({$entry->weight}%)<br />
</li>
</diV>
{/if}
{/foreach}
</ul>
{*<p>{$timetaken}: {$timetook}</p>*}
{else}
<div class="search-results-box-item search-results">
<p><strong>No result</strong></p>
</div>
{/if}
Here is the {search tag}
Code: Select all
{search formtemplate='mms_search' resultpage='results'}
here is the search input code:
Code: Select all
{$startform}
<input type="text" class="search-input form-control" id="{$search_actionid}searchinput" name="{$search_actionid}searchinput" size="20" maxlength="50" placeholder="search"/>
<button class="btn btn-search" name="submit" value="{$submittext}" type="submit" />
{if isset($hidden)}{$hidden}{/if}
{$endform}
It would be really nice if someone could clarify this for me?