Control Menu Entry Template

In this article, you’ll learn how to create a Liferay Control Menu entry as a Liferay module. To create a Liferay Control Menu entry via the command line using Blade CLI or Maven, use one of the commands with the following parameters:

blade create -t control-menu-entry -v 7.0 [-p packageName] [-c className] projectName


mvn archetype:generate \
    -DarchetypeGroupId=com.liferay \ \
    -DartifactId=[projectName] \
    -Dpackage=[packageName] \
    -DclassName=[className] \

You can also insert the -b maven parameter in the Blade command to generate a Maven project using Blade CLI.

The template for this kind of project is control-menu-entry. Suppose you want to create a control menu entry project called my-control-menu-entry-project with a package name of and a class name of SampleProductNavigationControlMenuEntry. You could run the following command to accomplish this:

blade create -t control-menu-entry -v 7.0 -p -c Sample my-control-menu-entry-project


mvn archetype:generate \
    -DarchetypeGroupId=com.liferay \ \
    -DgroupId=com.liferay \
    -DartifactId=my-control-menu-entry-project \ \
    -Dversion=1.0 \
    -DclassName=Sample \
    -Dauthor=Joe Bloggs \

After running the command above, your project’s directory structure would look like this:

  • my-control-menu-entry-project
    • gradle (only in Blade CLI generated projects)
      • wrapper
        • gradle-wrapper.jar
    • src
      • main
        • java
          • com/liferay/docs/entry/control/menu
        • resources
          • content
    • bnd.bnd
    • build.gradle
    • [gradlew|pom.xml]

The generated module is functional and is deployable to a Liferay DXP instance. To build upon the generated app, modify the project by adding logic and additional files to the folders outlined above. You can visit the control-menu-entry sample project for a more expanded sample of a Control Menu entry. Likewise, see the Customizing the Control Menu tutorial for instructions on customizing a Control Menu entry project.

« Content Targeting Tracking Action TemplateForm Field Template »
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0