留言板

Get content of structure

thumbnail
Soukaina HAJI,修改在9 年前。

Get content of structure

Regular Member 帖子: 195 加入日期: 14-6-17 最近的帖子
Hello, I need to get the content of a structure :
This is the script Iam trying to get done :

   String fieldValue = "";
   String structureId="11709";
   long groupId = assetEntry.getGroupId();

    JournalStructure article = null;
    try {
        article = JournalStructureLocalServiceUtil.getStructure(groupId,structureId);


I get the structure Id from this :



I got the structure but I can't find the method that allows me to get the content of the structure...

thank you



Liferay 6.2 ce ga2
Roshan Qureshi,修改在9 年前。

RE: Get content of structure

Regular Member 帖子: 159 加入日期: 10-8-24 最近的帖子
Salam Sukaina,

Structure does not have any content it self. But structure can have web contents associated with it.

So in your case, what is your requirement?
If you know the title of your content, you can get web content by title.

Regards,
Roshan Qureshi
thumbnail
Soukaina HAJI,修改在9 年前。

RE: Get content of structure

Regular Member 帖子: 195 加入日期: 14-6-17 最近的帖子
Salam , thanks for replying ,
I want to get the content of a select field from /asset_publisher/init.jsp.
Roshan Qureshi,修改在9 年前。

RE: Get content of structure

Regular Member 帖子: 159 加入日期: 10-8-24 最近的帖子
Please provide details of your functional requirements. What you want to do as a functional level (not code level)

If you want to get webcontents for a particular structure id, you can use below code

JournalArticleLocalServiceUtil.getStructureArticles(groupId, structureId);

It will give you the list of JournalArticles and you can traverse and get specific article.

Regards,
Roshan Qureshi
thumbnail
Soukaina HAJI,修改在9 年前。

RE: Get content of structure

Regular Member 帖子: 195 加入日期: 14-6-17 最近的帖子
I dont to get articles I want to get the structure content ,
to be more cleat I have this structure :



and I need to make a filter based on this options of "Etablissement" in the asset publisher


thank you ..
thumbnail
Manali Lalaji,修改在9 年前。

RE: Get content of structure

Expert 帖子: 362 加入日期: 10-3-9 最近的帖子
Hi,

f you have acces to article xml and know which fields you want to extract and display,
use XPath expression to get value of those elements.
Can you refer this link, link2

HTH!
thumbnail
Soukaina HAJI,修改在9 年前。

RE: Get content of structure

Regular Member 帖子: 195 加入日期: 14-6-17 最近的帖子
Hello, thanks for replying,
I dont want to get articles content , its their structure , Someone told me I should use tags and category I dnt know how , need some guidance ...

thank you