Recently, a friend of mine posted a singular question on a famous social media:
Do you still use the keyword field in articles?
Since decades, the content of the keyword meta tag isn't used anymore by search engines as a ranking factor.
Of course, you can still use it even if there's no impact for your content visibility but there's probably others smart use cases.
Joomla is extremely powerful when it comes to content management. That's why we all should try to stick to the core as much as possible.
I'm always amazed to find different or new possibilities to solve a problem only using the native features of our beloved CMS.
In this article, I'll show you an interesting use case of the keyword field.
Your content is powered by com_content
You can manage it easlily, you have a full control on it, and more important, you have many options to display it.
No need to install and maintain an extension
You don't have an extension to install and maintain. No learning curve to endure. Forget the heavy CCK and others page builders, because in most of the cases, you only need Joomla to get the desired result.
Improve your Joomla skills with the core
As said previously, I'm always amazed to find clean solutions thanks to Joomla native features. Thanks to this use case of the keyword field, I guess you will learn something new and useful about Joomla.
When it's come to add a new feature to display content on frontend, many people have the reflex to... add an extension.
Of course, there's no other choice in some cases but this shoudn't be a systematic answer of every problem we're facing.
As you may know, Joomla comes with so many core features that your solution is probably already in your site.
In such situation, my very first reflex is always to look at a core solution because Joomla offers A LOT.
And I strongly recommend you to adapt this healthy attitude.
Let's go back to out keyword field.
The content of this field is mainly used in 2 scenarios in Joomla:
If you're not very familiar with this module, here is the complete description:
This module displays other Articles that are related to the one being viewed. These relations are established by the Keywords.
All the keywords of the current Article are searched against all the keywords of all other published Articles. For example, you may have an Article on "Breeding Parrots" and another on "Hand Raising Black Cockatoos". If you include the keyword "parrot" in both Articles, then the Related Items Module will list the "Breeding Parrots" Article when viewing "Hand Raising Black Cockatoos" and vice-versa.
As the search engines don't use the content of this tag any more as an indexing factor, many of us have abandoned this field.
In my opinion, it's too early to bury this interesting core feature.
Let's go back to the description of the module mod_related_items: this module displays a list of articles related to the article currently readed. To be related, the articles should have the same keyword(s).
Now, imagine you have several authors on your website. It could be useful for the readers and nice for your authors to display some of their articles below their articles.
And rather than installing another extension, I'll show you how to acheive this simply using the keyword field.
We'll see all the details below but thanks to this trick, you'll be able to display some articles from the same author of the current article with only one module.
Yes, one core module for all your authors.
Only one core module to rule them'all.
Impossible to be lighter and simplier.
For this example, we want to display at the bottom of every article, 4 related items with for each item, the intro image, the title, and the intro text.
By default, the module mod_related_items displays only the title and the date of the related item. So we need to override it to get the desired result.
Here is the code (feel free to copy and adapt it to your needs).
I've added some comments for an easier reading.
Here are the settings of the module mod_related_items:
Note - In this example, the module is published in a template position right below the main component.
To be consistent and relevant, we want to display dynamically the name of the author with these related items. To acheive this, create an article override for the articles of your authors.
Then, copy/paste the following code at the bottom of this override:<h3 class="pt-5"> Others articles from <?php echo $this->item->metakey ; ?> </h3> <hr class="my-4">
Note - The syntax <?php echo $this->item->metakey ; ?> displays the content of the keyword field.
As usual, it's always possible to improve this trick and these overrides but I'm sure this use case of the keyword field associated to the module mod_related_items will offer interesting perspectives to creative and imaginative people.
The only limitation encountered here is the order of the related items displayed. It seems that the module displays by default the oldest items first.
Thanks to the keyword field, you can display some related items from the same author.
Thanks to the override, you can give to these related items, the exact design you want.
Thanks to the module mod_related_items, you don't need to add an extension.
Thanks to this 100% Joomla solution, you shouldn't face any issue while migrating your site in future.
All these Joomla features are natives and free.
Because the only limit is your imagination, let us know in the comment section below how you use the keyword field.
When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.