Explore the Core - Using the Latest Articles Module on your website
In earlier issues of the Joomla Community Magazine, we showed you how to create categories and articles.
We also explained what modules are and how you can use them. Now it’s time to see them in action! In this tutorial, you’ll learn how to show articles from one or more specific categories, anywhere you want on your website.
For this, you can use the Latest Article module. I will show you what it is, what it can do and how you can use it on your website.
What is the Latest Articles module
The latest Articles module shows links to articles on your website. You can control what links the module shows, and how they should be ordered.
Some use examples you can think of are:
- Show links to the latest news articles.
- If you have a website about cooking, you could show 5 random recipes.
- And if you have a tutorial website you could choose to show links to articles on a specific subject.
To have the module to be able to show any articles, first you need to have articles on your website. It would be great if you already have arranged your articles in different categories. I’m assuming you have that covered.
How can I create the Latest Articles module?
Time to put this module to work on your website and see what it does, go ahead! In Joomla 4, you’ll find the modules under Content in the left menu.
Click on the [+] icon next to the Site Modules title in the menu. You could also click on the title Site Modules, then you see the list of current website modules that are already in your site.
In that case you can easily add a module by clicking the [+ New] button on top of the screen.
When you create a module, Joomla wants to know the type of module you wish to create. Choose ‘Articles - Latest’.
What options does the module give you
The module Latest Articles can show links to articles that are fetched from your website.
You can choose…
- to filter the articles to 1 or more categories, or to have the module show results from all categories;
- to filter on 1 or more authors;
- the number of articles to display;
- whether or not it should display, or exclude the Featured articles;
- or even to only display Featured articles.
When you have set the right combination from all these options to suit your needs, you can also choose from a range of ordering options as well:
Assign the module to a position
Now it’s time to let your module see the light and make it appear on your website!
In order to do this, you have to assign the module to a module position. Most templates offer a range of predefined positions you can place your module in. In this example we are using the default Joomla template, Cassiopeia. In this case I choose the position ‘sidebar-right’.
Next thing you will have to consider is, if this module will appear in this position on all your pages, or if it will appear only on 1 or more specific pages. To do this, go to the next tab ‘Menu Assignment’. The default value is ‘On all pages’.
I want the module only to appear on my homepage. To do this, I click on the dropdown and choose the option ‘Only on the pages selected’. This shows me an overview of all current menu-items that are on my website. In this case I make sure that only the box that is next to the ‘home’ menu-item in my main menu is selected.
To finish things, I click on the ‘Save & Close’ button.
Imagine having multiple instances of this module, all with their own purpose and settings. Think of the power it adds to your own site!
Some articles published on the Joomla Community Magazine represent the personal opinion or experience of the Author on the specific topic and might not be aligned to the official position of the Joomla Project
By accepting you will be accessing a service provided by a third-party external to https://magazine.joomla.org/
Comments