Join Laura Gordon for an in-depth discussion in this video Making content dynamic with the Related Articles module, part of Adding Dynamic Functionality to Your Joomla! Site.
In this lesson we will modify the content articles, so that they can be related to each other. Then we're going to use the related news module, to display related news articles in module positions. Then lastly, using Low Position, we're going to actually display the related articles, inside of the content. To start, let's look at the website. The Joom Aquariam website, if you click on Exhibits and then from there scroll down and you can click on Stringray Beach.
Stingray Beach is information about the stingrays. Now, click on Events. Here you can see there some events that are relating to Stingrays, Feeding its Stingrays, and Petting Stingrays. It would be really nice if we could display the Feed Stingrays and the Pet Stingrays, on the left-hand side, when we're on the actual Stingray page, which is right here. So lets set everything up first. So let's go to the back end of the website, so we can modify the information.
Go to your Administrator panel of your website, go to Content and Article Manager. In the Filter, type in Stingray, so we can see the articles that we're thinking about. And you can see three articles in here. What we have to do is we need to add to each article, in the Meta keywords, the word Stingray. So that way, Joomla knows that these articles relate to each other. So let's click on Feed, Stingrays. On the right-hand side, click on Metadata Options.
In Meta Keywords, put in the word Stingray. Then click Save and Close. We're going to do this for each of the articles. For Pet Stingrays, click Metadata options, go to Keywords, type Stingray. Save and Close. And then the last one, Stingray Beach. Click on Metadata Options, put in Stingtray, Save and Close.
Now that we made the articles capable of being related to each other, let's go create the module. So go to Extentions and Module Manager, from here we're going to create a new module. Click on New, I'd like to use articles related articles. Related articles is a core module that comes with basic Joomla. So the title, we're going to type Stingray Information. The position, we'll put it in position 7, so it's on the left-hand side.
And I can Filter by the word left, if I don't remember what position it is, and then here, I can see it. I can type in the number 7, click Search, and then, I could see here, position 7. With the related articles, there's nothing else that you have to do, except to put it in there, position 7, it will automatically find all articles that relate to each other. I only want this to display though, are my Stingray Pages. So I'm going to click on only the pages selected.
I'm going to toggle the selection, which will take the check box off of all of the menu items, and now I'm just going to click on Stingray Beach, and then scroll up and hit Save and Close. Let's go back to the website and just click on Home. And now we'll go to Exihits and Sting Ray Beach. And now on the left-hand side, it says Stingray Information, Feed Stingrays and Pet Stingrays. I think it would be very useful if we actually displayed this module, inside of the Stingray Beach article.
Maybe it would say, see here for Stingray Events. And then it will list the feeding of the Stingrays and Pet Stingrays right underneath it. So to do that, we're going to use the Load Position. First, I need to change the module. I need to change the position of the module. Going to click on Stingray Information. And I'm going to change the module to say, Stingray Events. And I'm going to Copy it. And then hit Save and Close. Next, I go to the Content and Article Manager.
And I want to Modify the article Stingray Beach. I'll hit my Enter key a couple of times. And I will type see below for Stingray Events. Now I'll put in my Load Position, Curly Braces, Load Position, and I can hit Control V to Paste Stingray dash Events. Then I need to Close my Brace, click Save and Close. I can go back to Stingray Beach, hit F5.
Here is my dynamic content, see below for Stingray Events, and it lists the two articles that actually link to Stingray Beach. They link together, because of the keywords that I put in to all three articles. To me, this is truly dynamic content. As I add more articles into the website, as long as I put the word Stingray in the keywords, it will automatically list them here. You no longer have to hard-code links to put into articles. In this lesson, we reviewed how you can make your content even more dynamic.
To do this, we use the related news module. First, we had to modify the contents, so they can be related. Then we created the news module, which was the related news module, and then we displayed it within the article content by using low position.
- Extending Joomla! 2.5
- Copying an entire Joomla! site
- Quickly adding content to your website
- Displaying modules within your content
- Managing events
- Social networking with Joomla!
- Working with templates
- Making your website mobile-friendly with responsive templates
- Working with ACL levels