Forums de discussion
Displaying Asset Categories in ADT
Harsh Kanakhara, modifié il y a 7 années.
Displaying Asset Categories in ADT
Junior Member Publications: 74 Date d'inscription: 06/04/17 Publications récentes
I am selecting particular categories in the Asset Publisher Configuration page.
I want to display that specific categories only through my custom ADT.
Regards,
Harsh Kanakhara.
I want to display that specific categories only through my custom ADT.
Regards,
Harsh Kanakhara.
Robert Meissner, modifié il y a 7 années.
RE: Displaying Asset Categories in ADT
Junior Member Publications: 76 Date d'inscription: 26/02/15 Publications récentes
I guess, you will have to overrwrite the AssetRenderer in this case. Why don't you create your own AssetTypes? (This is just a hint)
Harsh Kanakhara, modifié il y a 7 années.
RE: Displaying Asset Categories in ADT (Réponse)
Junior Member Publications: 74 Date d'inscription: 06/04/17 Publications récentes
Debugging the Liferay Source I found out that categories passed in configuration for specific instance of asset publisher are getting stored in portlet preference.
I am getting in my custom ADT using this code. It will return String array of category Id
I am getting in my custom ADT using this code. It will return String array of category Id
$portletPreferences.get("queryValues0")
Sanjay D Panchal, modifié il y a 6 années.
RE: Displaying Asset Categories in ADT
New Member Publications: 2 Date d'inscription: 06/04/14 Publications récentes
Can you provide me in FTL
How to show categories wise in Some Exmaple Like New custom ADT Liferay Dxp + FTL .
Thanks in Advance
How to show categories wise in Some Exmaple Like New custom ADT Liferay Dxp + FTL .
Thanks in Advance
Harsh Kanakhara, modifié il y a 6 années.
RE: Displaying Asset Categories in ADT
Junior Member Publications: 74 Date d'inscription: 06/04/17 Publications récentes
This is the code to display categories id for the categories you have selected in ADT Configuration.
You can use AssetCategoryLocalService while iterating the list to get AssetCategory for all category Id.
Regards,
Harsh Kanakhara.
<#assign values = portletPreferences['queryValues0'] />
<#if values?has_content>
<li>Query Values:
<ul>
<#list values as value>
<li>${value}</li>
<!--#list-->
</ul>
</li>
<!--#if-->
You can use AssetCategoryLocalService while iterating the list to get AssetCategory for all category Id.
Regards,
Harsh Kanakhara.