Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.2 CEDefault Display Templates(Table, Title Lists, Abstracts) on Liferay 7.2 CEhttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1175245822024-03-28T23:54:54Z2024-03-28T23:54:54ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.Andrew Jardinehttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175740132019-10-25T21:55:53Z2019-10-25T21:55:53ZFair enough. But then ... WHY AREN'T THEY ADTs ALREADY?! <img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif" > <br /><br /><br />I have taken "the alternate" approach a few times in the past though when I had to build something ALMOST the same with just a few tweaks. Some of those JSPs would be difficult-to-complicated to turn into ADTs -- and you might not have access to some of the classes you need maybe? Like the AssetPublisherDisplayContext? Andrew Jardine2019-10-25T21:55:53ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.Olaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175754732019-10-25T19:16:42Z2019-10-25T19:16:42Z<div class="quote-title">Andrew Jardine:</div><blockquote><br />... so looks like you can control this list from the Control Panel > Configuration > System Settings > Assets > Asset Publisher (widget scope). I guess this means you can add your own with aJSP hook and then configure the name of the file in the config settings. Very cool.<br /></blockquote>Yeah - but why would you go through the trouble doing so, when you could just create a new FTL template?<br />My guess would be that this special handling will disappear sooner or later, for a uniform handling of the display styles. And then you'd have to edit FTL again, plus you'd have to migrate the stuff that took longer to implement in the first place. And you'd have to maintain it on every minor update already.Olaf Kock2019-10-25T19:16:42ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.Andrew Jardinehttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175736852019-10-25T19:03:36Z2019-10-25T19:03:36Z<html><head></head><body>Yep -- there they are. Mysteriously named --<br><br><ol style="list-style: decimal outside;" start="1"><li>view_asset_entries_table.jsp</li><li>view_asset_entries_title_list.jsp</li><li>view_asset_entries_list.jsp </li><li>etc.</li></ol><br>Digging through the source, in the /configuration/ subdirectory you will find the display_settings.jsp. Here you will find this:<br><br><pre><code><div class="display-template">
<liferay-ddm:template-selector className="<%= AssetEntry.class.getName() %>" defaultDisplayStyle="<%= assetPublisherDisplayContext.getDefaultDisplayStyle() %>" displayStyle="<%= assetPublisherDisplayContext.getDisplayStyle() %>" displayStyleGroupId="<%= assetPublisherDisplayContext.getDisplayStyleGroupId() %>" displayStyles="<%= Arrays.asList(assetPublisherDisplayContext.getDisplayStyles()) %>" label="display-template" refreshURL="<%= configurationRenderURL.toString() %>" />
</div></code></pre><br><br>and if we look at the AssetPublisherDisplayContext.getDisplayStyles(), the mystery of how they get into the list is solved.<br><br><pre><code>public String getDisplayStyle() {
if (_displayStyle != null) {
return _displayStyle;
}
_displayStyle = GetterUtil.getString(
_portletPreferences.getValue(
"displayStyle",
_assetPublisherPortletInstanceConfiguration.
defaultDisplayStyle()));
return _displayStyle;
}
</code></pre><br><br>... so looks like you can control this list from the Control Panel > Configuration > System Settings > Assets > Asset Publisher (widget scope). I guess this means you can add your own with aJSP hook and then configure the name of the file in the config settings. Very cool. Thanks for the helping hand Olaf! <img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif"></body></html>Andrew Jardine2019-10-25T19:03:36ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.Olaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175751872019-10-25T18:15:09Z2019-10-25T18:15:09Z<div class="quote-title">sree p:</div><blockquote><br />I want to see the FTL code from ADT of Table, Title Lists and Abstracts Display templates, those default I see on Asset Publisher settings, so just want to look up it's code</blockquote><br />There's no FTL for exactly the ones that you'd like to see. They're built-in to Liferay (probably for historical reasons, before Widget Display Templates came up) and you can find their jsps in the source tree in /modules/apps/asset/asset-publisher-web/src/main/resources/META-INF/resourcesOlaf Kock2019-10-25T18:15:09ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.sree phttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175709012019-10-25T18:03:35Z2019-10-25T18:03:35ZI want to see the FTL code from ADT of Table, Title Lists and Abstracts Display templates, those default I see on Asset Publisher settings, so just want to look up it's codesree p2019-10-25T18:03:35ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.Andrew Jardinehttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175733332019-10-25T17:47:27Z2019-10-25T17:47:27ZHi Sree,<br /><br />Sorry, but I'm still no understanding what you are looking for. Templating in Liferay has several contexts. You have Pade Display Templates, Widget (formerly Application) Display Templates, you had WCM Templates, etc. Can you maybe give me the steps to reproduce what you are looking for so that I can get on the same page -- and then possible help?Andrew Jardine2019-10-25T17:47:27ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.sree phttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175706022019-10-25T17:00:27Z2019-10-25T17:00:27Zno, I am working with Display templatesree p2019-10-25T17:00:27ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.Andrew Jardinehttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175621272019-10-24T19:41:37Z2019-10-24T19:41:37ZAre you working with a specific portlet? Maybe you can tell me what it is exactly you are trying to do -- that might make this go a little faster. Andrew Jardine2019-10-24T19:41:37ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.sree phttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175618412019-10-24T19:25:28Z2019-10-24T19:25:28ZHi Andrew , I can see the source but could not see the code of FTL for table, Title Lists , Abstracts Display templatessree p2019-10-24T19:25:28ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.Andrew Jardinehttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175487702019-10-23T23:33:46Z2019-10-23T23:33:46ZIt's not in the bundle -- it's a separate download: <a href="https://sourceforge.net/projects/lportal/files/Liferay%20Portal/7.2.0%20GA1/liferay-ce-portal-src-7.2.0-ga1-20190531153709761.zip/download">https://sourceforge.net/projects/lportal/files/Liferay%20Portal/7.2.0%20GA1/liferay-ce-portal-src-7.2.0-ga1-20190531153709761.zip/download</a>Andrew Jardine2019-10-23T23:33:46ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.sree phttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175498772019-10-23T22:26:23Z2019-10-23T22:26:23Zwhen I reindex i did not see Table, Title Lists, Abstracts ADTssree p2019-10-23T22:26:23ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.sree phttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175495912019-10-23T22:25:48Z2019-10-23T22:25:48ZI did not see the source from 7.2 ce bundle, can you please let me know sree p2019-10-23T22:25:48ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.Andrew Jardinehttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175474762019-10-23T17:18:01Z2019-10-23T17:18:01ZYou need to download the archive, unpack it and then go to that path. You can find the src archive for all the current and past versions here -- <a href="https://sourceforge.net/projects/lportal/files/Liferay%20Portal/">https://sourceforge.net/projects/lportal/files/Liferay%20Portal/</a> -- just make sure you pick the file with the "src" in the name. You could also go to github and navigate there, or clone the repo, etc. If you are working with DXP then the source for the version you are running is available on the customer portal.Andrew Jardine2019-10-23T17:18:01ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.sree phttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175442082019-10-23T16:16:45Z2019-10-23T16:16:45ZHello, Andrew, where can i see that path folder/Portal source and how can I get into this location: /liferay-ce-portal-src-7.2.0-ga1/modules/apps/asset/asset-publisher-web/src/main/resources/com/liferay/asset/publisher/web/portlet/template/dependencies/portlet-display-templates.xml?sree p2019-10-23T16:16:45ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.Andrew Jardinehttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175454082019-10-23T15:35:31Z2019-10-23T15:35:31ZSome of the ADT (or Widget) templates that are bundled with the portal are actually bundled with the portlets themselves. When a bundled template is added to the system it is visible for configuration, but you can't "edit" them. I think what you might be looking for is in the Liferay source code. I am not sure how true this is for 7.2 in honesty, but this was the case for past versions. <br /><br /><br />For example, if you wanted to see the templates bundled with the Asset Publisher, in the portal source, you would have a look at the location: /liferay-ce-portal-src-7.2.0-ga1/modules/apps/asset/asset-publisher-web/src/main/resources/com/liferay/asset/publisher/web/portlet/template/dependencies/portlet-display-templates.xmlAndrew Jardine2019-10-23T15:35:31ZRE: Default Display Templates(Table, Title Lists, Abstracts) on Liferay 7.Olaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1175285702019-10-22T07:22:37Z2019-10-22T07:22:37Z<div class="quote-title">sree p:</div><blockquote><br />Hellow, I want to see the code of the Default Display Templates (Table, Title Lists, Abstracts, Full Content ) on Liferay 7.2 CE , can you please let me know where i can see them , I went to Global and click widget templates , there I can see some under Structure.</blockquote&