<?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>Remove version number from assets links in Liferay 7.2 GA1</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114610986" />
  <subtitle>Remove version number from assets links in Liferay 7.2 GA1</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114610986</id>
  <updated>2026-04-04T02:30:14Z</updated>
  <dc:date>2026-04-04T02:30:14Z</dc:date>
  <entry>
    <title>RE: Remove version number from assets links in Liferay 7.2 GA1</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114634228" />
    <author>
      <name>Elena Stefanova</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114634228</id>
    <updated>2019-08-07T07:55:45Z</updated>
    <published>2019-08-07T07:55:45Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi, Mohammed!&lt;br&gt;&lt;br&gt;I found a workarround to solve my problem. Finally, I used the following code for assets full-view links:&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry) /&amp;amp;gt;
&amp;amp;lt;#if assetLinkBehavior != "showFullContent"&amp;amp;gt;
      &amp;amp;lt;#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL)?keep_before_last('/') + '?redirect=' + htmlUtil.escapeURL( themeDisplay.getURLCurrent() ) /&amp;amp;gt;
&amp;lt;!--#if--&amp;gt;
&amp;lt;h3 class="asset-title"&amp;gt;&amp;lt;a href="${viewURL}"&amp;gt;${entryTitle}&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&lt;/code&gt;&lt;/pre&gt;​​​​​​​This is how I manage to remove the version number from the url and like that assets full view is rendered correctly.&lt;br&gt;&lt;br&gt;Thank you for trying to help me!&lt;br&gt;&lt;br&gt;Greetings,&lt;br&gt;Eli&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Elena Stefanova</dc:creator>
    <dc:date>2019-08-07T07:55:45Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove version number from assets links in Liferay 7.2 GA1</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114622504" />
    <author>
      <name>Elena Stefanova</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114622504</id>
    <updated>2019-08-06T13:18:21Z</updated>
    <published>2019-08-06T13:18:21Z</published>
    <summary type="html">In the Asset publisher ADT I use the standard code to link the assets:&lt;br /&gt;&lt;br /&gt;&amp;lt;#assign assetRenderer = curEntry.getAssetRenderer() /&amp;gt;&lt;br /&gt;&amp;lt;#assign curEntryTitle = htmlUtil.escape(assetRenderer.getTitle(locale)) /&amp;gt;&lt;br /&gt;&amp;lt;#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, assetRenderer, curEntry, !stringUtil.equals(assetLinkBehavior, &amp;#34;showFullContent&amp;#34;)) /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;h3 class=&amp;#34;asset-title&amp;#34;&amp;gt;&amp;lt;a href=&amp;#34;${viewURL}&amp;#34;&amp;gt;${entryTitle}&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&lt;br /&gt;&lt;br /&gt;where stringUtil.equals(assetLinkBehavior, &amp;#34;showFullContent&amp;#34;) == false&lt;br /&gt;&lt;br /&gt;Then the full_view template code is a standard code that retrieves and show data from all the attributes of the journal article. And here, I should mention that the structure that I created for these assets is a little bit complex. By complex I mean that it has nested and repeatable attributes. I assume that the internal parser might have some difficulties with these attributes, but this is only an assumption.</summary>
    <dc:creator>Elena Stefanova</dc:creator>
    <dc:date>2019-08-06T13:18:21Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove version number from assets links in Liferay 7.2 GA1</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114621812" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114621812</id>
    <updated>2019-08-06T11:11:36Z</updated>
    <published>2019-08-06T11:11:36Z</published>
    <summary type="html">can you share your template code snippet may be i can try and fix the error</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2019-08-06T11:11:36Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove version number from assets links in Liferay 7.2 GA1</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114621462" />
    <author>
      <name>Elena Stefanova</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114621462</id>
    <updated>2019-08-06T10:32:23Z</updated>
    <published>2019-08-06T10:32:23Z</published>
    <summary type="html">No, I checked and this is the article version actually. It is a number like 1.2, 1.3...2.0 and increments each time I republish the article. By some strange reason this version in the URL causes me problems with the asset full preview. I get a syntax error in the template of type:&lt;br /&gt;&amp;#34;Syntax error in template &amp;#34;companyId#companyGroupId#null&amp;#34; in line 4, column 67: Encountered &amp;#34;.&amp;#34;, but was expecting:&amp;#34;&amp;gt;&amp;#34;&amp;#34;&lt;br /&gt;which is actually some parser error. And more strange is that this error is gone once I remove the article version from the rendered url.</summary>
    <dc:creator>Elena Stefanova</dc:creator>
    <dc:date>2019-08-06T10:32:23Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove version number from assets links in Liferay 7.2 GA1</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114617125" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114617125</id>
    <updated>2019-08-06T09:41:52Z</updated>
    <published>2019-08-06T09:41:52Z</published>
    <summary type="html">I think that  is portlet instance id which you are referring as version number</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2019-08-06T09:41:52Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove version number from assets links in Liferay 7.2 GA1</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114616698" />
    <author>
      <name>Elena Stefanova</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114616698</id>
    <updated>2019-08-06T08:09:01Z</updated>
    <published>2019-08-06T08:09:01Z</published>
    <summary type="html">Hi, Mohammed!&lt;br /&gt;&lt;br /&gt;Yes, this is a version number added right after the asset friendly url. It looks like that: domainname.com/-/&amp;lt;asset_friendly_url&amp;gt;/&amp;lt;version_number&amp;gt;?redirect=%2F&amp;lt;render_page&amp;gt;</summary>
    <dc:creator>Elena Stefanova</dc:creator>
    <dc:date>2019-08-06T08:09:01Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove version number from assets links in Liferay 7.2 GA1</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114614428" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114614428</id>
    <updated>2019-08-05T19:05:30Z</updated>
    <published>2019-08-05T19:05:30Z</published>
    <summary type="html">Hi,&lt;br /&gt; Can you please share which part in the url your are referring.</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2019-08-05T19:05:30Z</dc:date>
  </entry>
  <entry>
    <title>Remove version number from assets links in Liferay 7.2 GA1</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114610985" />
    <author>
      <name>Elena Stefanova</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114610985</id>
    <updated>2019-08-05T15:36:37Z</updated>
    <published>2019-08-05T15:36:37Z</published>
    <summary type="html">Hi, there!&lt;br /&gt;&lt;br /&gt;I&amp;#39;m using the Asset publisher portlet to display a list of assets inside some pages of my projects as in Display configurations of the portlet I set the option to &amp;#34;View in Context&amp;#34; these assets. However, I noticed that there is some number (probably a version number or something else) displayed as a query parameter in the asset full view URL. In the older liferay versions this number was not set, but in liferay 7.2-ga1 yes. Is there any possibility to remove this number from the assets URL? &lt;br /&gt;&lt;br /&gt;Thanks in advance,&lt;br /&gt;Eli</summary>
    <dc:creator>Elena Stefanova</dc:creator>
    <dc:date>2019-08-05T15:36:37Z</dc:date>
  </entry>
</feed>
