Display a Search Module as a Joomla Top Menu Item

Display a Search Module as a Joomla Top Menu Item

Written by Valentin Garcia on February 01, 2018 | Joomla

Load Modules inside Joomla Menus

It's very common for websites to put features inside top menus. You may find some sites do this with a login form. Others - with an advertisement or a search field.

In this tutorial, you will learn how to embed a search module inside your Joomla top menu as a menu item. Without any coding. To do the job, we'll just use a free and very popular extension called Modules Anywhere.

Step #1. Install Modules Anywhere

download modules anywhere

  • Login to your Joomla administrator area.
  • Go to Extensions > Manage.
  • Click the Upload Package File tab.
  • Click the Or browse the file green button.
  • Find the Modules Anywhere file you just downloaded and click on it twice to install it.

Excellent! You just installed the Modules Anywhere package to your site. It will help you embed a search module, or any other module for that matter, into your Joomla top menu.

Step #2. Create a Search Module

In this step, you will create the search module to be embedded in your top menu as a menu item.

  • Go to Extensions > Modules.
  • You will be taken to the Modules (Site) admin page. Click New.

click new

  • You will see the Select a Module Type list.

select a module type

  • Scroll slightly down and click Search.

click search

  • Enter My Search for Top Menu in the Title field.
  • Find the Show Title setting and set it to Hide.

set show title to hide

  • Click Save & Close.
  • You will see the Modules (Site) page once again. Find the My Search for Top Menu module you just created. Take notice of its ID number. In my example, the ID number is 35.

notice id number

Step #3. Create a Menu Item for the Search Module

Your newly created Search module is now ready to be displayed. Let's display it as a regular Joomla menu item in our top menu.

  • Go to Menus > <your top menu> > Add New Menu Item. For the purpose of this tutorial, I'll use my Main Menu.

add new menu item

  • Select your top menu from the Menu field. In my case, this is the Main Menu.

select main menu

  1. Enter {module 35}, including the curly brackets, in the Menu Title box.
  2. Click Select.

enter module title click select

  • You will see the Menu Item Type modal box. Go to System Links > Separator.

system links separator

  • Click Save & Close.

You will see your new menu item listed with the rest of your top menu items.

list of menu items

Step #4. Check the Final Result

  • Visit your site front end. Take a look at your main menu. You will see that it now includes your Search module. Just as you planned at the beginning of this tutorial.