Friday, 15 June 2012

maven - Custom category in liferay portlet -


I'm really struggling with it and I do not think this is right.

I is a liefier portlet, which I am trying to put in a custom category but keeps it in the 'undefined' category. I have setup my liferay-display.xml with a hard coding for testing but it still does not do this. Note I'm using maven instead of ant for construction and dependencies. The portlet works fine, it's not just in the category that I want. Once liferay-display.xml is created in the WEB-INF folder (which I believe is where it is). Below is an example of the file.

  & lt ;? XML version = "1.0"? & Gt; & Lt ;! DOCTYPE Display Public "- // Liferay / DTD Display 6.1.0 / n" "http://www.liferay.com/dtd/liferay-display_6_1_0.dtd"> & Lt; Display & gt; & Lt; Category name = "Hello" & gt; & Lt; Portlet ID = "Hello Portlet" & gt; & Lt; / Portlet & gt; & Lt; / Category & gt; & Lt; / Display & gt;   

Any help would be greatly appreciated. I know that I have not got any information according to the information.

The Portlet ID should be the ID that you give in Portlet.xml - I'm not sure that you Any place can give anything, but the following portlet.xml and liferay-display.xml will match:

portlet.xml

  & lt; Portlet-app xmlns = "http: //java.sun.com/xml/ns/p ...." version = "2.0" & gt; & Lt; Portlet & gt; & Lt; Portlet-name & gt; HelloPortlet & lt; / Portlet-name & gt; & Lt; Display-name & gt; Hello Portlet & lt; / Display-name & gt; ...   

and liferay-display.xml

  & lt ;? XML version = "1.0"? & Gt; & Lt ;! DOCTYPE Display Public "- // Liferay // DTD Display 6.1.0 / / n" "http: // www ..." & gt; & Lt; Display & gt; & Lt; Category name = "Hello" & gt; & Lt; Portlet ID = "Hello Portlet" & gt; & Lt; / Portlet & gt; & Lt; / Category & gt; & Lt; / Display & gt;   

For example, use portlet-name element from portlet.exam as portlet id.

No comments:

Post a Comment