Legacy Knowledge Base
Published Jul. 2, 2025

Adding a custom item into the journal article drop-down menu (web content drop-down menu)

Written By

Phil Chapman

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • Within the drop-down menu for Web Content, is there a way to configure my own custom items? 

  • The example for Document Library seen in this blog utilizes the DLDisplayContextFactory extension point. Is there an equivalent for Web Content?

Environment

  • DXP 7.3

Resolution

  • There is no equivalent extension point like DLDisplayContextFactory for Web Content.  Presently this is a recognized product limitation.

  • However, the intended need is theoretically possible by instead directly modifying Liferay source code for JournalArticleActionDropdownItemsProvider, which is functionally equivalent to developing a marketplace override.

    For reference, changes could be modeled using this commit. To get a functioning custom item, JournalDisplayContext and JournalArticleActionDropdownItemsProvider are utilized. We can check this by looking at our view_entries.jsp where we use the following to call a Clay implementation of a dropdown menu:

    <liferay-ui:search-container-column-text>
     <clay:dropdown-actions
     defaultEventHandler="<%= JournalWebConstants.JOURNAL_ELEMENTS_DEFAULT_EVENT_HANDLER %>"
     dropdownItems="<%= journalDisplayContext.getArticleActionDropdownItems(curArticle) %>"
     />
    </liferay-ui:search-container-column-text>

    The list is populated using getArticleActionDropdownItems which is populated by the DropdownItemsProvider.

    JournalArticleActionDropdownItemsProvider is the location where the item is added to the dropdown menu and can be used to further trace from there. 

    See:
    - com.liferay.frontend.taglib.clay.servlet.taglib.util.DropdownItem
    - com.liferay.frontend.taglib.clay.servlet.taglib.util.DropdownItemList;
    - com.liferay.frontend.taglib.clay.servlet.taglib.util.DropdownItemListBuilder;
    - com.liferay.journal.web.internal.servlet.taglib.util.JournalArticleActionDropdownItemsProvider
    - modules\apps\journal\journal-web\src\main\resources\META-INF\resources\view_entries.jsp
    - ElementsDefaultEventHandler

    Note: For clarification, marketplace overrides do not leverage documented extension points. Marketplace overrides, forcefully override Liferay behavior in order to achieve a given need.

Additional Information

  • A feature request for this functionality for Web Content has been raised. It may be followed here.
Did this article resolve your issue ?

Legacy Knowledge Base