Forums

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

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Christian Schefer
Abstract & Categorization in Web Content's editor
August 15, 2011 12:11 PM
Answer

Christian Schefer

Rank: New Member

Posts: 19

Join Date: May 27, 2011

Recent Posts

Hi guys!,

Could i disable the "Abstract" and "Categorization" items when someone edit a web content portlet?

We don't use them. For a clean view at edit moment, i want to disable it.

Thanks in advance!!
David H Nebinger
RE: Abstract & Categorization in Web Content's editor
August 15, 2011 1:42 PM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11332

Join Date: September 1, 2006

Recent Posts

Yes, you can disable them, but you'll probably need to implement a hook to do so. Your hook would override the JSP page to remove the elements from the page.
Hitoshi Ozawa
RE: Abstract & Categorization in Web Content's editor
August 15, 2011 5:58 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

You just have to comment out lines 525 through 606 in file ROOT/html/portlet/journal/edit_article.jsp
Christian Schefer
RE: Abstract & Categorization in Web Content's editor
August 16, 2011 9:21 AM
Answer

Christian Schefer

Rank: New Member

Posts: 19

Join Date: May 27, 2011

Recent Posts

Thanks a lot guys!!

I made a backup of the file and I deleted those lines. It works very well for me.

Thanks again!
Hitoshi Ozawa
RE: Abstract & Categorization in Web Content's editor
August 16, 2011 3:20 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

My pleasure, but it would have been better to just add "<!--" at the beginning to the lines and a "-->" after the last line to just comment the lines out.
Liferay also recommends keeping changes as a hook (a .war file), but that would require setting up a development environment. If you're not going
to be passing your version of Liferay out, it really doesn't matter too much. Just keep track of where you've made the changes so you'll be able to
do it again when you version up Liferay.
Achmed Tyrannus Albab
RE: Abstract & Categorization in Web Content's editor
February 23, 2012 7:58 PM
Answer

Achmed Tyrannus Albab

Rank: Regular Member

Posts: 118

Join Date: March 5, 2010

Recent Posts

Hi,

I was actually looking to remove the Advance>> / Basic>> of the Structure and Template section of the content editing for certain editors.
But i am not sure how to do it.
But then, i found this thread (sorry for reviving old thread...free information is quite scarce).

So i removed the Abstract and Categorization as well since wouldn't be using it much.
And what i did to solve my problem is backed up edit_article_extra.jspf and delete the contents of the original one.
This will cause all users with editing permission wouldn't be able to see this Structure and Template editing option mode.
And users with better roles can edit the templates via Control Panel > Web Contents OR the icon edit template .

I was quite happy with my findings and thank you for leading me there.
1.Just that i am still wondering if there any other better way to do this that wouldn't cost me too much work.
2.OR if the way i'm doing this is incorrect and would cause problems later on?
3.Is there a way to do this without involving the codes? I tried looking in permissions but couldn't find any.


Regards,
Achmed

Added:
Found the tag in edit_article.jsp at line 606.
Removed <%@ include file="edit_article_extra.jspf" %> instead of emptying edit_article_extra.jspf.
edit_article_extra.jspf reverted.

Still i'm wondering if i could specify this viewing (edit content mode) ability according to roles without touching the codes.
Hitoshi Ozawa
RE: Abstract & Categorization in Web Content's editor
February 23, 2012 9:06 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Yes, the way you'll doing is not recommended because you're modifying Liferay source code directly which implies you'll be bound to the LGPL.

You're addition on editing the edit_article.jsp is correct. I'll have to check about the permission.

Lastly, you should have created a new thread instead of reviving an old thread.
Achmed Tyrannus Albab
RE: Abstract & Categorization in Web Content's editor
February 24, 2012 2:22 AM
Answer

Achmed Tyrannus Albab

Rank: Regular Member

Posts: 118

Join Date: March 5, 2010

Recent Posts

Ok sorry bout the thread, but since its already revived might as well continue here.

I just want to add that removing/commenting-out any of these tags in will cause problems (Liferay 6.0.6 bundle Tomcat) such as
publishing web contents.

The error returned was r is null in my Firefox Javascript error checker.

Oh well i've reverted back everything.

But if i was doing it wrong please correct me. Or if there is a better way to do it.

Regards,
Achmed
Hebatu Allah Fahmy
RE: Abstract & Categorization in Web Content's editor
September 1, 2012 3:25 AM
Answer

Hebatu Allah Fahmy

Rank: Junior Member

Posts: 41

Join Date: August 6, 2012

Recent Posts

in liferay 6.1 edit_article has only 414 line
How can I remove categoraization section in liferay 6.1 ?