Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Faisal K
Where is the code for showing the Add Page in Navigation?
June 7, 2009 9:34 PM
Answer

Faisal K

Rank: Regular Member

Posts: 138

Join Date: January 9, 2008

Recent Posts

Hi All,

I am using liferay 5.2.3 version, I want to know where is the code written for showing the 'Add Page' in the top Navigation, It is not there in navigation.vm, I think it is done by using some java-script coding, where can I find the code? I want to hide the 'AddPage' option even for Administrator or Owner of the Community.

Thanks in Advance.
Shahzad . Hussain
RE: Where is the code for showing the Add Page in Navigation?
June 8, 2009 5:39 AM
Answer

Shahzad . Hussain

Rank: Junior Member

Posts: 52

Join Date: May 26, 2008

Recent Posts

Asak faisal,

To disabling add page option for admin, you need to change navigation.js file which is present inside webapps/ROOT/html/js/liferay/navigation.js.There you will find a function like this _addPage: function(event, obj) just remove this function from the file.
Faisal K
RE: Where is the code for showing the Add Page in Navigation?
June 8, 2009 6:28 AM
Answer

Faisal K

Rank: Regular Member

Posts: 138

Join Date: January 9, 2008

Recent Posts

Thank you so much Mr Tannu,

I want to know where this API is being called, I don't want to change the API existing, If you have any Idea please help me?


Thanks in Advance.
Liviu Cismaru
RE: Where is the code for showing the Add Page in Navigation?
November 13, 2009 6:22 AM
Answer

Liviu Cismaru

Rank: New Member

Posts: 14

Join Date: September 10, 2008

Recent Posts

Fasial,

The way I find easier to inhibit the Add Page js code is to comment the line(s) below from the "initialize" function in navigation.js:

// instance._makeAddable();
// instance._makeDeletable();
// instance._makeSortable();
// instance._makeEditable();


You may only need to comment one of them, or all.

Liviu


Faisal K:
Hi All,

I am using liferay 5.2.3 version, I want to know where is the code written for showing the 'Add Page' in the top Navigation, It is not there in navigation.vm, I think it is done by using some java-script coding, where can I find the code? I want to hide the 'AddPage' option even for Administrator or Owner of the Community.

Thanks in Advance.