O'Reilly logo

Using Joomla by Kenneth Crowder, Ron Severdia

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Showing a Module Inside an Article

Modules are usually associated with menu items, but sometimes you’ll want to associate modules with a specific article. Modules are commonly assigned to module positions and these positions appear on the web page as defined in your template.

But sometimes it’s useful to have a module actually “embedded” in the article itself and this gives you a great deal of flexibility over where you display your modules. To do so, follow these steps:

  1. Go to ExtensionsModule Manager and locate the article you want the module to appear in.

  2. Create a new module or open an existing module. Choose the module position you will use for displaying inline in an article. Let’s say “inarticle” is the name of the new module position we’ll use. Click Save.

  3. Go to ContentArticle Manager and locate the article you want the module to appear in.

  4. Click the article name to open it for editing. Find the place where you want the module to be.

  5. Enter {loadposition myposition} where you’ll replace myposition with the name of the module position you used in step 2 (see Figure 9-8). Using the name “inarticle” from step 2, the code you put in the article would be {loadposition inarticle}.

The module tag inserted into an article

Figure 9-8. The module tag inserted into an article

Any module assigned to the inarticle position will now load in that article. Check out your results by viewing the article on the frontend. Your module should ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required