Forums de discussion

Disable ability to modify menu names in navigation bar

Al Krinker, modifié il y a 13 années.

Disable ability to modify menu names in navigation bar

New Member Publications: 17 Date d'inscription: 11/03/11 Publications récentes
So let's say I created liferay.com community. Let's say, I have top menu of "Menu1", "Menu2", and "Menu3". Let's say that "Menu1" has 2 children: "Menu1_a" and "Menu1_b".

I click on Menu1 and then I click on Menu1_a. If I want to go back to contents of Menu1, I need to click on Menu1 again, but here is the problem, as soon as I do it, the edit box appears and now I am editing the name of the menu! So in order to get back to Menu1, I need to click away to Menu2 and then come back to Menu1...

So, how do I change it and get rid of this "edit the menu" box?

I put this into my portal-ext.properties

layout.user.private.layouts.modifiable=false
layout.user.public.layouts.modifiable=false

and it works for my private and public pages, but I cant find anything to disable those editing pop ups on a community level. Any ideas?

Thanks
Amine Bousta, modifié il y a 13 années.

RE: Disable ability to modify menu names in navigation bar

Junior Member Publications: 32 Date d'inscription: 02/08/07 Publications récentes
Hi

You may modify your theme in order to disable this functionality (navigation.vm)
Al Krinker, modifié il y a 13 années.

RE: Disable ability to modify menu names in navigation bar

New Member Publications: 17 Date d'inscription: 11/03/11 Publications récentes
I looked through navigation.vm code, but I did not see where I need to modify the code in order to remove this functionality. Do you mind pointing me to it? Thanks!
thumbnail
Dhrutika Parekh, modifié il y a 13 années.

RE: Disable ability to modify menu names in navigation bar

Expert Publications: 435 Date d'inscription: 09/02/09 Publications récentes
Hi,

You need to modify navigation.vm to achieve this.

<nav class="sort-pages modify-pages" id="navigation">

if you remove "modify-pages" than no one will have ability to update page names.or you can add condition based class.(i.e. some role can have ability to update page names)


Hope it helps.

Regards,
Dhrutika Parekh
Al Krinker, modifié il y a 13 années.

RE: Disable ability to modify menu names in navigation bar

New Member Publications: 17 Date d'inscription: 11/03/11 Publications récentes
Perfect. Exactly what I was looking for. Thank you!
Alexander Ishmuradov, modifié il y a 8 années.

RE: Disable ability to modify menu names in navigation bar

Junior Member Publications: 48 Date d'inscription: 18/03/13 Publications récentes
This doesn't work for me in Liferay 6.1.1

I've replaced

<nav class="$nav_css_class" id="navigation">


with

<nav class="sort-pages" id="navigation">


But after this is compiled I get finally the following structure:

<nav class="sort-pages yui3-dd-drop" id="navigation">
..
<ul id="...">
<li class="lfr-nav-deletable lfr-nav-updateable yui3-dd-drop" id="...">...</li>
<li class="lfr-nav-deletable lfr-nav-updateable yui3-dd-drop" id="...">...</li>
...
</ul>
</nav>


These CSS classes are added automatically: lfr-nav-deletable lfr-nav-updateable yui3-dd-drop

If only I got rid of those classes.. But I cannot understand where they are added: there are no such classes (and even velocity variables) for <li> element in navigation.vm
thumbnail
David H Nebinger, modifié il y a 8 années.

RE: Disable ability to modify menu names in navigation bar

Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
Please open a new thread rather than reviving a dead one.
Alexander Ishmuradov, modifié il y a 8 années.

RE: Disable ability to modify menu names in navigation bar

Junior Member Publications: 48 Date d'inscription: 18/03/13 Publications récentes
Ok, I'll take into account. But this was a minor problem and has already been solved.
Alexander Ishmuradov, modifié il y a 8 années.

RE: Disable ability to modify menu names in navigation bar

Junior Member Publications: 48 Date d'inscription: 18/03/13 Publications récentes
Removing all classes, including 'sort-pages', did the trick:

<nav id="navigation">