Page 1 of 1

Search function fail on frontpage - works on subpages

Posted: Wed Feb 12, 2014 6:08 pm
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 :-[

Re: Search function fail on frontpage - works on subpages

Posted: Wed Feb 12, 2014 6:49 pm
by velden
the search function doesn't Work
What does that mean? Could you post a link to the website?

Re: Search function fail on frontpage - works on subpages

Posted: Wed Feb 12, 2014 7:30 pm
by Rolf
Don't put the Search tag *in* the menu template...

Re: Search function fail on frontpage - works on subpages

Posted: Thu Feb 13, 2014 3:49 pm
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 ?