Menu link only for administrators

Author Message

Danilo Shiga

Thursday 21 February 2008 10:33:46 am

i wanted to put a link in the flat top menu that would be only visible for administrator users, but I'm having troubles with the better way to do it and how the current user should be filtered.

thanks for any help.

Mark Marsiglio

Thursday 21 February 2008 10:41:40 am

The best way to do this is to use permissions.

Create a new section (admin > setup > section) and assign it to your new content. I think that this, in itself, should be enough to meet your requirements.

You can get a lot more complex with it, but if you create a new section and don't explicitly give the anonymous role permission to see it, admins will be able to see it when they are logged in.

To be safe, you can also create a new role which has access to content/read/yournewsection and apply that (along with the anonymous) role to new a user group. Then add users to that new group and they will be able to see it. Do this if the people who you want to see the new hidden folder really are not admins.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Danilo Shiga

Thursday 21 February 2008 11:10:48 am

thanks, this solve my problem, i was trying to do this inserting code in the flat_top, but your solution looks better.

Mark Marsiglio

Thursday 21 February 2008 11:14:09 am

The way you were trying to do it would be appropriate if you wanted content to be visible on the site, but not as a direct link from the navigation. You could exclude a particular node from flat_top.tpl to make that happen. But the content would still be visible in search and by direct link.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.