掲示板

adding web content in portal-ext.properties

10年前 に biswajit sarkar によって更新されました。

adding web content in portal-ext.properties

Regular Member 投稿: 166 参加年月日: 11/10/17 最新の投稿
How can i add web content in portal-ext.properties ?
And how can i get that that web content in java class or jsp??

thanks
thumbnail
10年前 に Manali Lalaji によって更新されました。

RE: adding web content in portal-ext.properties

Expert 投稿: 362 参加年月日: 10/03/09 最新の投稿
Hi Biswajit,

Do you mean to add webcontent types via portal-ext? Can you clarify your requirements a bit more?
10年前 に biswajit sarkar によって更新されました。

RE: adding web content in portal-ext.properties

Regular Member 投稿: 166 参加年月日: 11/10/17 最新の投稿
I try to fetch web content in my custom portlet.
I just want to know is it possible to save web content in "portal-ext.properties" and fetch that web content in my custom portlet.
10年前 に sravan kumar によって更新されました。

RE: adding web content in portal-ext.properties

Junior Member 投稿: 78 参加年月日: 13/02/19 最新の投稿
how can i re-use the webcontent portlet?
thumbnail
10年前 に sushil patidar によって更新されました。

RE: adding web content in portal-ext.properties

Expert 投稿: 467 参加年月日: 11/10/31 最新の投稿
biswajit sarkar:
I try to fetch web content in my custom portlet.
I just want to know is it possible to save web content in "portal-ext.properties" and fetch that web content in my custom portlet.


Hi,
Your question is not clear to me, can you please make it more clear that you want to save web content id OR web content in the portal-ext.properties.?

Regards
thumbnail
10年前 に sushil patidar によって更新されました。

RE: adding web content in portal-ext.properties

Expert 投稿: 467 参加年月日: 11/10/31 最新の投稿
Hi,
If you add the web content id in the portal-ext.properties than get the property value and use following tag to get the web content.
<liferay-ui:journal-article articleId="" groupId="" showTitle="" />

I hope i got your question correctly.

Regards
thumbnail
10年前 に Ritesh Gajera によって更新されました。

RE: adding web content in portal-ext.properties

Junior Member 投稿: 66 参加年月日: 12/02/21 最新の投稿
biswajit sarkar:
How can i add web content in portal-ext.properties ?
And how can i get that that web content in java class or jsp??

thanks


Hi biswajit,

If you are thinking to display web content in JSP page, just 2-3 steps far you are :
Step1:
portal-ext.properties :

acticle.name=YourJournalArticleName
no.actical.text=No Article Exists with this name.

Step2:
JSP File :

<%
String content = StringPool.BLANK;
try{
String articleName = PropsUtil.get("acticle.name");

JournalArticle journalArticle = JournalArticleLocalServiceUtil.getArticleByUrlTitle (themeDisplay.getScopeGroupId(), articleName);
String articleId = journalArticle.getArticleId();
JournalArticleDisplay articleDisplay = JournalContentUtil.getDisplay (themeDisplay.getScoprGroupId(), articleId,"","",themeDisplay);
content = articleDisplay.getContent();
}Catch(Exception e){
content = PropsUtil.get("no.article.text");
}
%>

<%= content %>

I hope this will help you.
Regards,
Ritesh Gajera