<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Get unique ID of the asset publisher</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=122383604" />
  <subtitle>Get unique ID of the asset publisher</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=122383604</id>
  <updated>2026-04-07T07:43:55Z</updated>
  <dc:date>2026-04-07T07:43:55Z</dc:date>
  <entry>
    <title>RE: RE: Get unique ID of the asset publisher</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122399961" />
    <author>
      <name>David Vian</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122399961</id>
    <updated>2024-02-20T17:36:27Z</updated>
    <published>2024-02-14T14:14:30Z</published>
    <summary type="html">&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;This is how I used it, for the sake of readability&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;&amp;lt;#assign portlet_id = themeDisplay.getPortletDisplay().getId() /&amp;gt;
&amp;lt;#assign split_id = portlet_id?split(&amp;quot;_&amp;quot;) /&amp;gt;
&amp;lt;#assign el_id = split_id?last /&amp;gt;

${el_id}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>David Vian</dc:creator>
    <dc:date>2024-02-14T14:14:30Z</dc:date>
  </entry>
  <entry>
    <title>RE: Get unique ID of the asset publisher</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122399623" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122399623</id>
    <updated>2024-02-20T17:36:31Z</updated>
    <published>2024-02-14T11:18:33Z</published>
    <summary type="html">&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can use the portlet instance id for referring each asset
  publisher on the page.&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-html"&gt;${themeDisplay.getPortletDisplay().getId()}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-html"&gt;${themeDisplay.getPortletDisplay().getInstanceId()}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2024-02-14T11:18:33Z</dc:date>
  </entry>
  <entry>
    <title>Get unique ID of the asset publisher</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122383603" />
    <author>
      <name>David Vian</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122383603</id>
    <updated>2024-02-06T18:35:51Z</updated>
    <published>2024-02-06T16:19:51Z</published>
    <summary type="html">&lt;p&gt;I have 3 asset publisher inside a page, and I have to manage some
  javascript interaction.&lt;/p&gt;
&lt;p&gt;In my freemarker widget template I need a unique ID to use in my js
  in order to know exactly which of the 3 asset publisher I am
  controlling, as you can do with fragments.&lt;/p&gt;
&lt;p&gt;How can I print it out?&lt;/p&gt;</summary>
    <dc:creator>David Vian</dc:creator>
    <dc:date>2024-02-06T16:19:51Z</dc:date>
  </entry>
</feed>
