Skip to content
Tutorials Center
My learning

Topics

Lesson 17 of 37 ยท Menus and Modules

Modules and Template Positions in Joomla

Learn what Joomla modules are, how template positions work, how to assign modules to pages and user levels, and how ordering and styles work, with a runnable resolver.

A Joomla page has a main area filled by a component, and many smaller areas around it: header, menu, sidebars, footer. Those smaller blocks are modules. A module shows one thing, such as a menu, a search box, a login form, a list of latest articles or a block of your own HTML, and it appears in a position defined by the template. Placing and assigning modules is the main way to compose pages without code.

The backend is described in words. The stand-ins implement the placement rules so that you can try them with your own data.

Where modules live

Frontend (site) modules are managed under Content > Site Modules. The backend has its own modules under Content > Administrator Modules (dashboard panels, quick icons). A site module has:

  • Title, with a switch to show or hide it.
  • Module type: Custom, Menu, Articles - Latest, Articles - Category, Breadcrumbs, Login, Search, Banners, Language Switcher, Syndication, Who's Online and many more.
  • Position: where in the template it appears.
  • Status, Access, Language, Start/Finish Publishing, Ordering.
  • Menu Assignment: on which pages it appears.
  • Advanced options: layout, module class suffix, caching, module tag and style.

Custom modules

The Custom type holds your own HTML in an editor, ideal for a contact snippet, a banner text or an embedded widget. In most templates a Custom module in the footer position is how you add copyright text.

Template positions

A template defines positions: named slots in its layout. The default Joomla 4 and 5 template, Cassiopeia, offers positions such as topbar, below-top, menu, search, banner, top-a, top-b, main-top, main-bottom, breadcrumbs, sidebar-left, sidebar-right, bottom-a, bottom-b, footer and debug. Different templates define different names, so choose the position from the dropdown in the module form (it lists the positions of the active template, plus any already used).

You can see the positions of a template in the backend under System > Site Template Styles > (style) > Positions or by adding ?tp=1 to a page URL on a site where the template position preview is enabled (older Joomla versions). Check the documentation of your version.

flowchart TB
    subgraph Page
      A["topbar / menu / search"]
      B["banner / top-a / top-b"]
      subgraph Middle
        C["sidebar-left"]
        D["main: component output"]
        E["sidebar-right"]
      end
      F["bottom-a / bottom-b"]
      G["footer"]
    end

Positions around the main component area. Names vary by template.

From module to page

Create Pick a module type and fill the form
Position Choose where it appears
Assign Choose which pages show it
Access Who may see it

Publish, then check the frontend

1 / 2

The Menu Assignment tab decides on which pages (menu items) a module appears:

  • On all pages
  • No pages (a good way to disable it without losing settings)
  • Only on the pages selected
  • On all pages except those selected

Because assignment is by menu item, a page without a menu item (for example, a deep article link) inherits modules from the active menu item that matched the route.

Ordering and multiple modules

Several modules can share a position. They are shown in ordering sequence (a number you can drag in the list or choose in the form), from small to large. Each module renders its own box; the template decides how modules in one position are wrapped (see the style below).

Module styles (chrome)

When a template includes a position it uses an instruction like <jdoc:include type="modules" name="sidebar-right" style="card" />. The style (the chrome) decides how each module is wrapped: Cassiopeia provides card, none, html5, outline and a few more; the module's own Style setting in the Advanced tab can override the chrome. You can also add a Module Class (for CSS) and change the Header Tag (h3 by default).

Module resolver

The stand-in below decides which modules to render for a page, mirroring the rules you just read: status, publishing dates, access, assignment and ordering.

JS Stand-in: which modules appear on this page?

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Check how the "Login" module (assigned to all pages except members) vanishes on the members page, and how ordering puts Login before Latest news. The "Members tips" module is visible only to Registered users.

Chrome in miniature

JS Stand-in: wrap modules with a chrome style

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Real chromes are PHP layout files inside templates, which is why a template can restyle every module in a position with one file.

Practical advice

  • Name your modules clearly (include position and page in the title for large sites) because the module list grows quickly.
  • Use "No pages" to park modules.
  • Do not overload positions; every module adds queries and HTML.
  • Check access levels: a module set to Registered shows nothing to guests.
  • Test on mobile; many templates hide or move sidebar modules on small screens.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is a module position?

    Templates define positions; modules are placed in them.
  2. 2. A module is Published but does not appear on a page. What should you check?

    Assignment, access, publishing dates and the position all matter.
  3. 3. How is the order of modules in one position decided?

    Modules are sorted by their ordering number, small to large.
  4. 4. Which module type lets you add your own HTML?

    The Custom module holds free HTML or text edited in the editor.

Summary

  • Modules are small blocks placed in template positions around the component output.
  • Create them under Content > Site Modules; set position, access, dates, assignment and style.
  • Menu Assignment decides which pages show a module; ordering sorts modules within a position.
  • Chrome styles wrap each module; Cassiopeia offers card, html5, none and more.
  • When a module is missing, check status, assignment, access, dates and position.

Next: Menu Modules and Site Navigation