FUM restricted nodes > edit menu template

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Gamonon

FUM restricted nodes > edit menu template

Post by Gamonon »

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}
Gamonon

Re: FUM restricted nodes > edit menu template

Post by Gamonon »

That menu template works but is another menu template as mine.
This one has sidebar navigation while mine is top navigation.

So I need my own template to work with the logged in restriction

Thanks
Post Reply

Return to “Developers Discussion”