留言板

Where is the code for showing the Add Page in Navigation?

thumbnail
Faisal K,修改在14 年前。

Where is the code for showing the Add Page in Navigation?

Regular Member 帖子: 138 加入日期: 08-1-9 最近的帖子
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.
thumbnail
Md Tannu ..............,修改在14 年前。

RE: Where is the code for showing the Add Page in Navigation?

Junior Member 帖子: 52 加入日期: 08-5-26 最近的帖子
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.
thumbnail
Faisal K,修改在14 年前。

RE: Where is the code for showing the Add Page in Navigation?

Regular Member 帖子: 138 加入日期: 08-1-9 最近的帖子
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.
thumbnail
Liviu Cismaru,修改在14 年前。

RE: Where is the code for showing the Add Page in Navigation?

New Member 帖子: 14 加入日期: 08-9-10 最近的帖子
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.