Code: Select all
{if feu_smarty::is_user_memberof('Auteurs,Membres,potentiel')}
I choose this page page
{Navigator template="nautres.tpl"}
{else}
You must be member
{/if}
Code: Select all
{if !isset($depth)}{$depth=0}{/if}
{if isset($nodes)}{strip}
<ul style="list-style-type:none; ">
{foreach $nodes as $node}
{if ($node->extra1 == 'retour' ) or ($node->extra1== 'annonce') or
( ($node->extra1=='membres'and feu_smarty::is_user_memberof('Membres')) or
($node->extra1=='auteurs'and feu_smarty::is_user_memberof('Auteurs'))or
($node->extra1=='attente'and feu_smarty::is_user_memberof('potentiel'))
)}
{if $node->current}
<li><a href="{$node->url}" class="currentpage"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} </a>
{else}
<li><a href="{$node->url}">{$node->menutext}</a></li>
{/if}
{/if}
{/foreach}
</ul>
{/strip}{/if}
I could remove all AND by using more IF conditions and it was OK for this page.Syntax error in template "module_file_tpl:module_file_tpl:Navigator;nautres.tpl" on line 19 "( ($node->extra1=='membres'and feu_smarty::is_user_memberof('Membres')) or" - Unexpected "and"
But I had a new error in a gabarit with the code :
Code: Select all
{menu template="autres.tpl"}
Code: Select all
<ul style="list-style-type:none; ">
{foreach from=$nodelist item=node}
{if ($node->extra1 == 'retour' ) or ($node->extra1== 'annonce') or
( ($ccuser->loggedin())and
(($node->extra1=='membres'and feu_smarty::is_user_memberof('Membres')) or
($node->extra1=='auteurs'and feu_smarty::is_user_memberof('Auteurs'))or
($node->extra1=='attente'and feu_smarty::is_user_memberof('potentiel'))
))}
{if $node->current == true}
<li><a href="{$node->url}" class="currentpage"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->Syntax error in template "module_file_tpl:module_file_tpl:MenuManager;autres.tpl" on line 4 "( ($ccuser->loggedin())and" - Unexpected "and"
menutext} </a>
{else}
<li><a href="{$node->url}">{$node->menutext}</a></li>
{/if}
{/if}
{/foreach}
</ul>
At this point, I changed all AND in && and all OR in || and since I made these changes in both templates, my site runs perfectly.Syntax error in template "module_file_tpl:module_file_tpl:MenuManager;autres.tpl" on line 4 "( ($ccuser->loggedin())and" - Unexpected "and"
I presume that navigation with templates containing so much AND - OR are harder to compile than with && - || instead.