掲示板
Retrieving field labels for web content structures in ADT
9年前 に Maarten J によって更新されました。
Retrieving field labels for web content structures in ADT
New Member 投稿: 18 参加年月日: 12/01/25 最新の投稿
In https://www.liferay.com/community/forums/-/message_boards/message/40807826 I answered my own question on how to retrieve localized values for custom webcontent structures in an ADT (Liferay 6.2).
The part which is missing imo is the retrieval of the label of these fields (localized). I can't find anywhere how to do this and imo this is not possible. Would be a big plus if that is possible.
#if (!$entries.isEmpty())
#foreach ($entry in $entries)
#set($renderer = $entry.getAssetRenderer() )
#set($className = $renderer.getClassName() )
#if( $className == "com.liferay.portlet.journal.model.JournalArticle" )
#set( $journalArticle = $renderer.getArticle() )
#set( $document = $saxReaderUtil.read($journalArticle.getContentByLocale($locale.toString())))
#set( $node = $document.selectSingleNode("/root/dynamic-element[@name='firstName']/dynamic-content"))
#set( $firstName = $node.getText() )
Firstname: $firstName
#set( $name = $document.selectSingleNode("/root/dynamic-element[@name='lastName']/dynamic-content"))
Lastname: $name.getText()
#end
#end
#end
The part which is missing imo is the retrieval of the label of these fields (localized). I can't find anywhere how to do this and imo this is not possible. Would be a big plus if that is possible.
8年前 に Sabrina Toulouse によって更新されました。
RE: Retrieving field labels for web content structures in ADT
New Member 投稿: 21 参加年月日: 15/06/09 最新の投稿
Hi,
Did you find a way? I need that as well
Did you find a way? I need that as well