Page 1 of 2
Upgrade to 1.9.1 - {site_mapper} show hidden menu
Posted: Fri Nov 26, 2010 4:06 pm
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.
Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu
Posted: Sat Nov 27, 2010 4:00 am
by Dr.CSS
Anything in site mapper tag Help?...
Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu
Posted: Sat Nov 27, 2010 9:25 am
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.
Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu
Posted: Sat Nov 27, 2010 7:09 pm
by Dr.CSS
Have you tried just using {menu}?...
Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu
Posted: Sat Nov 27, 2010 7:59 pm
by maranc
No, but how to use {menu} with {site_mapper}?
Marek A.
Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu
Posted: Mon Nov 29, 2010 3:13 pm
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"}
[Solved] Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu
Posted: Tue Nov 30, 2010 2:20 pm
by maranc
Of course, it's very simple and effectiv solution. Now is ok, thanks for inspiration.
Marek A.
Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu
Posted: Tue Nov 30, 2010 2:32 pm
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 ;=)
Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu
Posted: Tue Nov 30, 2010 4:24 pm
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.
Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu
Posted: Wed Dec 01, 2010 11:37 am
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.
Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu
Posted: Wed Dec 01, 2010 12:03 pm
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
Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu
Posted: Wed Dec 01, 2010 3:07 pm
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.
Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu
Posted: Wed Dec 01, 2010 3:10 pm
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
Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu
Posted: Wed Dec 01, 2010 7:58 pm
by maranc
Also I need only add this logic to simple.tpl and everything will work
Marek A.
Re: Upgrade to 1.9.1 - {site_mapper} show hidden menu
Posted: Wed Dec 01, 2010 8:38 pm
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