Upgrade to 1.9.1 - {site_mapper} show hidden menu

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

Upgrade to 1.9.1 - {site_mapper} show hidden menu

Post by maranc »

Hi, I upgraded my site to version 1.9.1 (and all neccesary modules like CGExtension, SelfRegistration etc). Everything works excellent, but hier is one issue wit tag {site_mapper}. {site_mapper} plugin show in site map all hidden menu (on version 1.8.0 worked excellent}
I didn't change nothing with param page and manu template. Main manu template is like bellow:

Code: Select all

{* CSS classes used in this template:
.currentpage - The active/current page
.bullet_sectionheader - To style section header
hr.separator - To style the ruler for the separator *} 

{if $count > 0}
<ul class="clearfix">
{foreach from=$nodelist item=node}
{if ($node->extra1 == 'restricted' and $ccuser->memberof('pracownicy')) or $node->extra1=='' }
{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->current == true}
<li><a href="{$node->url}" class="currentpage"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} </a>

{elseif $node->parent == true && $node->depth == 1 and $node->type != 'sectionheader' and $node->type != 'separator'}
<li class="activeparent"> <a href="{$node->url}" class="activeparent"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} </a>

{elseif $node->type == 'sectionheader'}
<li class="sectionheader">{$node->menutext}

{elseif $node->type == 'separator'}
<li style="list-style-type: none;"> <hr class="separator" />

{else}
<li><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} </a>

{/if}
{/if} {*zamkniecie instrukcji warunkowej dla pola extra1*}
{/foreach}

{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
All hidden pages have the same attrib: not cacheable, not searchable and extra1 filed is: "resctricted". Manu working good (hidden menu is only visible when user with right privilage (memberof: 'pracownicy') logged in), but {site_mapper} still show all menu.

What's wrong? Any solution?

Marek A.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu

Post by Dr.CSS »

Anything in site mapper tag Help?...
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu

Post by maranc »

Code: Select all

What does this do?

This is actually just a wrapper tag for the Menu Manager module to make the tag syntax easier, and to simplify creating a sitemap.
How do I use it?

Just put {site_mapper} on a page or in a template. For help about the Menu Manager module, what parameters it takes etc., please refer to the Menu Manager module help.

By default, if no template option is specified the minimal_menu.tpl file will be used.

Any parameters used in the tag are available in the menumanager template as {$menuparams.paramname}
It's all in help. I checked that there isn't any changes in plugin {site_mapper} /the same code like in cms 1.8.1}.  So, earlier plugin working corectly, but now not.

Marek A.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu

Post by Dr.CSS »

Have you tried just using {menu}?...
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu

Post by maranc »

No, but how to use {menu} with {site_mapper}?

Marek A.
osxfil
Forum Members
Forum Members
Posts: 186
Joined: Wed Apr 01, 2009 6:03 pm

Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu

Post by osxfil »

remove tag {site_mapper} and replace it by e.g. {menu template="minimal_menu.tpl"}, if you want show page, which aren't in standard menu, you can use this tag {menu template="minimal_menu.tpl" showall="1"}
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

[Solved] Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu

Post by maranc »

Of course, it's very simple and effectiv solution. Now is ok, thanks for inspiration.

Marek A.
HansDampf
Forum Members
Forum Members
Posts: 60
Joined: Sun Nov 28, 2010 10:07 am

Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu

Post by HansDampf »

If there is a problem in a plugin or module that module should be corrected, switching to another module or plugin is a workaround, but not a solution

I have the same problem with that tag and none of my clients will pay my work for updating pages, installing and testing workarounds,  just because a plugin is not working correctly

I hope you understand me, I need a solution for that plugin ;=)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu

Post by Dr.CSS »

Help for the site_mapper

What does this do?

This is actually just a wrapper tag for the Menu Manager module to make the tag syntax easier, and to simplify creating a sitemap.
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu

Post by maranc »

HansDampf wrote: If there is a problem in a plugin or module that module should be corrected, switching to another module or plugin is a workaround, but not a solution

I have the same problem with that tag and none of my clients will pay my work for updating pages, installing and testing workarounds,  just because a plugin is not working correctly

I hope you understand me, I need a solution for that plugin ;=)
HansDampf - I know that this is not right solution, because the plugin {site_mapper} not working such as shoud work and I'm like you not happy, when I must write on forum and search solution. I know that for all us it's not comfort situation, when we lost our time.

From this reason thema is not solved ... inserting tag {menu} is an alternative solution, but the problem with plugin still exist.

Marek A.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu

Post by RonnyK »

just a question....

{site_mapper} is a wrapper, which basically does {menu template="minimal_menu.tpl"}.

Inactive and Hidden pages, as set on the options tab of a page will NOT be showing in that setting.

Your 'hidden' pages, are pages that have modified logic in the menumanager template, and thus will not show, when {menu} is called with that modified menu-template.

I didnt hear/see about an issue with {site_mapper} in this discussion, or are you saying that those 'hidden' pages, are marked as non-showing in their options-tabs?

Ronny
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu

Post by maranc »

Maybe I not explain good, but these hidden pages ara still marked as "show in menu". They are hidden because in my menu template on line 8 you can see:

{if ($node->extra1 == 'restricted' and $ccuser->memberof('pracownicy')) or $node->extra1=='' }

This logic based on calguy1000 tutorial (how conect FEU and menu). Hidden menu means that some of part menu are visible only for registered user (group 'pracownicy'), only when user in specified group logged in. The problem is that in vers. 1.9.1 {site_mapper} shows these hidden (restricted) pages for all, earlier when user was logged in and was in group 'parcownicy'.

Marek A.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu

Post by RonnyK »

True,

but as said, site_mapper uses the simple.tpl, which does NOT have that logic inside.....  SO these pages wont be hidden for the site_mapper..

Ronny
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu

Post by maranc »

Also I need only add this logic to simple.tpl and everything will work :)

Marek A.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu

Post by RonnyK »

Nope ;) I wouldnt modify the .tpl, as that might be overwritten in an upgrade.

I would just call like {site_mapper template='the-required-template'}, where the template is then the imported/modified version of the minimal.tpl.

Ronny
Locked

Return to “[locked] Installation, Setup and Upgrade”