<?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>AssetPublisher context menu for web context - adding an item</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121848026" />
  <subtitle>AssetPublisher context menu for web context - adding an item</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121848026</id>
  <updated>2026-06-29T02:21:11Z</updated>
  <dc:date>2026-06-29T02:21:11Z</dc:date>
  <entry>
    <title>RE: AssetPublisher context menu for web context - adding an item</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121864474" />
    <author>
      <name>Pasi Kössi</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121864474</id>
    <updated>2023-06-15T14:05:17Z</updated>
    <published>2023-06-15T14:05:16Z</published>
    <summary type="html">&lt;p&gt;I managed to (sort of) sove this, with the help of Olaf Kock in Slack.&lt;/p&gt;
&lt;p&gt;Basically adding an entry to this context menu for Web Content is
  straight-forward. All you have to do is to
  implement com.liferay.asset.kernel.action.AssetEntryAction for
  JournalContent, and the entry pops up in your AssetPublishers (for web content).&lt;/p&gt;
&lt;p&gt;Here is the relevant part of the component declaration:&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;@Component(
    property = {
        &amp;quot;javax.portlet.name=&amp;quot; + JournalPortletKeys.JOURNAL,
        &amp;quot;model.class.name=com.liferay.journal.model.JournalArticle&amp;quot;
    },
    service = AssetEntryAction.class
)
public class MyJournalExpireAssetEntryAction
    implements AssetEntryAction&amp;lt;JournalArticle&amp;gt; {&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;You can look at a full example in the source
  of  &amp;quot;....\modules\apps\journal\journal-web\src\main\java\com\liferay\journal\web\internal\portlet\action\JournalPermissionAssetEntryAction.java&amp;quot;
  (sorry about the Windows path).&lt;/p&gt;
&lt;p&gt;In this case this was not enough, though, as the current
  implementation only works with GET requests and the actionCommand to
  expire an article only accepts POST requests (actually it seems to be
  designed to show a dialog for further actions, but we do not have one
  available). As we already have an ext-module for AssetPublisher, I
  decided to implement the required &amp;quot;fix&amp;quot; in there. &lt;/p&gt;
&lt;p&gt;The jsp file in question is asset_actions.jsp directly under
  resources/META-INF/resources. I added code that sends a POST request
  instead of a GET when the URL string contains javax.portlet.action parameter.&lt;/p&gt;
&lt;p&gt;This was done for Liferay version 7.4.2-ga3.&lt;/p&gt;
&lt;p&gt;I do think there may be a better solution for this, but this one
  seems to work for this particular customer case. If anyone has better
  suggestions, feel free to comment..&lt;/p&gt;</summary>
    <dc:creator>Pasi Kössi</dc:creator>
    <dc:date>2023-06-15T14:05:16Z</dc:date>
  </entry>
  <entry>
    <title>AssetPublisher context menu for web context - adding an item</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121848025" />
    <author>
      <name>Pasi Kössi</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121848025</id>
    <updated>2023-06-07T08:25:10Z</updated>
    <published>2023-06-07T06:44:38Z</published>
    <summary type="html">&lt;p&gt;In Liferay 7.4 AssetPublisher has an option to show content
  completely. For web content articles, there is a context menu for each
  item that contains, by default, the items &amp;quot;Edit&amp;quot; and
  &amp;quot;Permissions&amp;quot;. We need to add the option &amp;quot;Expire&amp;quot;
  to that menu to make things easier for the end user. I have gone
  through source code to find how to do this, but I have not yet found a
  way. I have a hunch that in the default AssetPublisher/JournalContent
  code this is handled by a dynamic include, but I did not find the code
  that actually implements the include for JournalArticles. I have
  checked code for 7.4.3 ga4, ga23 and the ga76.&lt;/p&gt;
&lt;p&gt;We already have an ext module for AssetPublisher, but this code is
  probably on the Journal side.&lt;br&gt;
  &lt;br&gt; Best Regards,&lt;/p&gt;
&lt;p&gt;Pasi&lt;/p&gt;</summary>
    <dc:creator>Pasi Kössi</dc:creator>
    <dc:date>2023-06-07T06:44:38Z</dc:date>
  </entry>
</feed>
