FUM restricted nodes > edit menu template
Posted: Wed Nov 25, 2009 2:13 am
I am trying to invoke the FUM and Custom Content to create member restricted pages.
I have downloaded the verry good instruction manual of Robert Campbell on this topic and
I am on my way ... so far.
The example of modifying a menu template is done on a menu template I don't use. Mine
seems to be quite different and I am not a experienced programmer in this.
I have been trying to insert the extra code in order to make it work with my template, but
without success.
Could someone point me where or how I should insert these code lines in my menu template
to make this work?
Thanks a million!
John
The lines to be inserted are:
{if ($node->extra1 == 'restricted' and $ccuser->loggedin()) or $node->extra1== '' }
==code==
{/if}{* node->extra1 *}
My menu template looks like this:
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if $node->current == true && $node->depth == 1}
url}" class="active">{$node->menutext}
{elseif $node->depth == 1}
url}">{$node->menutext}
{elseif $node->current == true && $node->depth != 1}
url}" {if $node->accesskey != ''} accesskey="
{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}{if $node->target != ''} target="{$node->target}"{/if}>{$node->menutext}
{elseif $node->type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{else}
url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}{if $node->target != ''} target="{$node->target}"{/if}>{$node->menutext}
{/if}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
I have downloaded the verry good instruction manual of Robert Campbell on this topic and
I am on my way ... so far.
The example of modifying a menu template is done on a menu template I don't use. Mine
seems to be quite different and I am not a experienced programmer in this.
I have been trying to insert the extra code in order to make it work with my template, but
without success.
Could someone point me where or how I should insert these code lines in my menu template
to make this work?
Thanks a million!
John
The lines to be inserted are:
{if ($node->extra1 == 'restricted' and $ccuser->loggedin()) or $node->extra1== '' }
==code==
{/if}{* node->extra1 *}
My menu template looks like this:
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if $node->current == true && $node->depth == 1}
url}" class="active">{$node->menutext}
{elseif $node->depth == 1}
url}">{$node->menutext}
{elseif $node->current == true && $node->depth != 1}
url}" {if $node->accesskey != ''} accesskey="
{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}{if $node->target != ''} target="{$node->target}"{/if}>{$node->menutext}
{elseif $node->type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{else}
url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}{if $node->target != ''} target="{$node->target}"{/if}>{$node->menutext}
{/if}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}