Forums de discussion
Retrieving field labels for web content structures in ADT
Maarten J, modifié il y a 9 années.
Retrieving field labels for web content structures in ADT
New Member Publications: 18 Date d'inscription: 25/01/12 Publications récentes
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.
Sabrina Toulouse, modifié il y a 8 années.
RE: Retrieving field labels for web content structures in ADT
New Member Publications: 21 Date d'inscription: 09/06/15 Publications récentes
Hi,
Did you find a way? I need that as well
Did you find a way? I need that as well