Pierre-François Fiat Il y a 7 années Hello,thanks a lot for this article, very intersting !First question : How does $catPropertyLocalService.getCategoryProperty($cat.categoryId, "color_code") work in your case ? Second question : Why don't you test if it is a Ecphrasic article before doing this : #set( $pictureSelector = $saxReaderUtil.createXPath("dynamic-element[@name='imgPicture']") ) #set( $picture = $pictureSelector.selectSingleNode($rootElement).getStringValue() )I guess you get a null to $pictureSelector if the node 'imgPicture' does not exist. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Pierre-François Fiat Pierre-François Fiat Il y a 7 années Answer to first question : https://web.liferay.com/fr/web/javeedchida/blog/-/blogs/fun-with-generic-content-templates Sorry about that Javeed ! Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Javeed Chida Pierre-François Fiat Il y a 7 années Yes, I suppose if I got the structure of the journalArticle, it would be more elegant than checking for the existence of a field from that structure. Do share if you have the API call handy to get that? I'll look for it as well. The only way I found was to get the ddSmStructureKey from a JournalArticleDisplay.Thank you for taking the time to share. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Pierre-François Fiat Javeed Chida Il y a 7 années Same here with DDMStructure, I do it this way : <#assign structureKey = assetRenderer.getArticle().getStructureId()> <#assign DDMStructureLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService")> <#assign structure = DDMStructureLocalService.getStructure(entry.getGroupId(),entry.getClassNameId(),structureKey,true)>${structure.getFieldLabel("fieldName", locale)} Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Javeed Chida Pierre-François Fiat Il y a 7 années Beautiful! Thanks for sharing. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Pierre-François Fiat Pierre-François Fiat Il y a 7 années Answer to first question : https://web.liferay.com/fr/web/javeedchida/blog/-/blogs/fun-with-generic-content-templates Sorry about that Javeed ! Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Javeed Chida Pierre-François Fiat Il y a 7 années Yes, I suppose if I got the structure of the journalArticle, it would be more elegant than checking for the existence of a field from that structure. Do share if you have the API call handy to get that? I'll look for it as well. The only way I found was to get the ddSmStructureKey from a JournalArticleDisplay.Thank you for taking the time to share. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Pierre-François Fiat Javeed Chida Il y a 7 années Same here with DDMStructure, I do it this way : <#assign structureKey = assetRenderer.getArticle().getStructureId()> <#assign DDMStructureLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService")> <#assign structure = DDMStructureLocalService.getStructure(entry.getGroupId(),entry.getClassNameId(),structureKey,true)>${structure.getFieldLabel("fieldName", locale)} Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Javeed Chida Pierre-François Fiat Il y a 7 années Beautiful! Thanks for sharing. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Pierre-François Fiat Javeed Chida Il y a 7 années Same here with DDMStructure, I do it this way : <#assign structureKey = assetRenderer.getArticle().getStructureId()> <#assign DDMStructureLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService")> <#assign structure = DDMStructureLocalService.getStructure(entry.getGroupId(),entry.getClassNameId(),structureKey,true)>${structure.getFieldLabel("fieldName", locale)} Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Javeed Chida Pierre-François Fiat Il y a 7 années Beautiful! Thanks for sharing. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Javeed Chida Pierre-François Fiat Il y a 7 années Beautiful! Thanks for sharing. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler