Search function fail on frontpage - works on subpages

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
fiberflux
New Member
New Member
Posts: 2
Joined: Wed Feb 12, 2014 3:26 pm

Search function fail on frontpage - works on subpages

Post by fiberflux »

Hi I am running CMSMS 1.11.9 - TemplateMadeSimple - Advanced Content - GBFilepicker.

When I use the code below, then the search function doesn't Work on my FrontPage (index page)- But it Works in every other subpage.

I put the {search} call in the end of the GlobalContentBlock tms_menu.

Code: Select all

{if $count > 0}
<ul class="clearfix">
{foreach from=$nodelist item=node name=foo}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}</li>{elseif $node->index > 0}</li>
{/if}
{if $node->type == 'sectionheader'}
	<li class="sectionheader{if $node->menutext == "devider"} hide{/if}{if $node->current == true || $node->parent == true} selected{/if}{if $node->children_exist == true} children{/if}"><span class="sectionheader">{$node->raw_menutext}</span>
{else}
	<li class="{if $smarty.foreach.foo.first} first{elseif $smarty.foreach.foo.last} last{/if}{if $node->children_exist == true} children{/if}{if $node->current == true || $node->parent == true} selected{/if}"><a href="{$node->url}{if $smarty.get.skin != ''}?skin={$smarty.get.skin}{/if}"{if $node->target ne ""} target="{$node->target}"{/if}{if $node->current == true || $node->parent == true} class="selected"{/if}><span>{$node->raw_menutext}</span>
</a>
{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li><br />{search}</ul>

{/if}
The GCB tms_menu is called from another GCB tms_header. See bottom.

Code: Select all

</head>
</__body class="tms_template {$class}">
<div class="wrapper">
	{*<div class="siteinfo{if $hidelogotext == true} hasimage{/if}">
		<h3 class="title">{sitename}</h3>
		<h4 class="desc">{$dump1[0]->extensions->slogan->data}</h4>
	</div>
	<div class="topnavi clearfix">
		{menu childrenof="tms_info" template="tms_menu"}
	</div>*}
	<div class="header">
		{global_content name='tms_slideshow'}
	</div>
	<div class="navi clearfix" id="navi">
		<nav>{menu template="tms_menu"}</nav>
	</div>
Can anyone explain me what I am doing wrong :-[
Attachments
SearchField.JPG
Last edited by fiberflux on Thu Feb 13, 2014 11:55 am, edited 1 time in total.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Search function fail on frontpage - works on subpages

Post by velden »

the search function doesn't Work
What does that mean? Could you post a link to the website?
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Search function fail on frontpage - works on subpages

Post by Rolf »

Don't put the Search tag *in* the menu template...
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Search function fail on frontpage - works on subpages

Post by velden »

I would love to see the actual website. Further, it can't be valid html what you're outputting there. A <br /> outside the LI inside the UL ?
Post Reply

Return to “Modules/Add-Ons”