The Joomla Module Manager
Modules are one of my favorite things in joomla. Modules allow you to put just about anything anywhere around your site. In a sidebar and a header and a footer, even inside an article and Joomla gives you lots of options here. If I click on new, if you want to do that with me, I can have a module for archived articles, a list of categories, all the articles in a category, the latest articles, most read, news flash, related, banners, breadcrumbs, custom feeds, but well you get the idea. There's lots and lots of built in ones here and what's really great about Joomla is there's a ton of extra ones that you can download. I'll talk about that in just a little bit. As a reminder, every template in Joomla comes with a set of module positions and, once again, if you just add question mark TP equals 1 to the root of your URL you'll see all of the positions for this particular template. There's position one that has a slightly gray background, as well as position three, position seven is on the right, position eight is on the left. Now I know that makes no sense but this is why we're able to see these position layouts. With question mark TP equals 1, there's a footer position, a debug position, which you don't typically use, and then a position 0 up here which is the header position. Once again, different templates will have different positions. They'll be named differently and so this is really helpful. If you purchase a template, nine times out of ten they're going to come with a guide built in but if they don't, don't worry. Just come and do what we just did and you'll be able to see all the positions that are available to you. Back on your administration site, go ahead and click new and let's add a couple of modules to our site. Let's add the latest articles module. Go ahead and click on that and give it a title of latest articles that make sense from all categories or you can just make it from a few categories. How many would you like to show? Would you show featured articles? Which, in this case, means our welcome article will show up because it's one of the newest articles so let's change that to no or hide simply because, if it's on the home page, while it's going to be already there, most recently added first, any author on the right hand side will show the title. Scroll all the way down and let's put it in position seven, which is the right position in this particular template, and go ahead and click Save and let's take a quick peek. Let's leave it open because we're going to come back and make a change. I'm going to get rid of the question mark TP equals 1 and now you'll see our latest articles here, not including our welcome to Joomla Ville because we told it not to include featured articles. This is the last time you'll ever have to touch this. This is one of the great things about a content management system. If I was creating this page in a static HTML and I added, let's say, a new festival, then I'd have to come over here and add the new festivals to the top, get rid of the Independence Day and do that all manually, on every page. With a content management system, it will automatically appear. I never have to touch this again. Alright, what if I only want this on the home page but I don't want to run any other page and that's pretty typical. We haven't covered this yet so let's cover it now. Come back over to your administrator side and click on menu assignment. You can assign any module to any page. So on all pages, no pages, only the page is selected or all the pages except those selected. Go ahead and choose only on the pages selected. Go ahead and select none, because that's a lot of pages to uncheck, and go ahead and choose the home page under your main menu. Click Save, go back to your home page and hit refresh. There's my latest articles. It's shifted down. We're going to reposition that in just a minute but if I go to the train station, well, guess what? It's not there anymore. Congratulations, you've now filtered your module by page. You can also show modules based on the user's permissions. You can also update module positions. We'll talk about access control towards the end of the course, so don't worry about that for now. Finally, under advanced, one of the things you'll see a lot is module class suffixes. This allows certain modules to take on a different look and feel and we'll play with that in just a few minutes when we add our new template. You can change the header tag from an h3 to anything you want. You can even add a class to the header and you can even change the layouts if your template offers that. So going back over to the module tab now I can also reorder it here but frankly I find it easier to do it any other screen. Go ahead and click Save and close. Let's filter by position and now you'll see that order of our modules. Just for argument's sake, let's go ahead and put latest articles after the login form. Click on the ordering link and grab latest articles. Drag it down and let's check out what we just did and, indeed, now our latest articles is below the login form. Alright, let's add one more module. While we still have this filtered into position 7, click new and let's go ahead and click most read articles. Once again, we'll leave it at all categories but we'll hide the featured articles. Let's put the title as most read articles. You can title these anything you want, of course, because we'd already filtered by position 7. The position is already selected for us. You can filter this particular module by a date range which, again, is really, really great or even a relative date. The date field that is being used here you can change from created, modified or publishing date and, again, you can set up a date range and then change that back to off because we're not going to filter by date. Go ahead and click Save and close. Now, once again, this is going to be on every page. I go back to my home page, here are the most read articles and Joomla will keep these statistics for us and update this on a regular basis. I use this one on my own blog; it helps bring my most popular content to the top even though it's a little bit older. Modules allow you to put pretty much anything you want anywhere you want around your website. Go ahead one more time and click new and this time click custom. Let's call this welcome to Joomla Ville and, in here, let's put welcome to our site. Thanks for stopping by. Of course, you could put anything you want in there. You could add some images, you even embed some video. Anything you want. That's the great thing because, again, we filtered at position seven it's going to be already there for us. Once again let's only put this on the home page. So only on the pages selected, none and home because you really don't want the welcome message on more than just your home page. Click Save and close. Let's grab the welcome to Joomla ville and drag it above the main menu. Go out to our home page and there you see it. I go anywhere else, the Welcome message is gone. One last thing before we move on. Go back to your welcome to Joomla ville message and you'll notice, over here on the right, that access is set to public. That means that everybody can see this. Go ahead and change that to guest. A guest is somebody who's on your site but not logged in. Go ahead and click Save and close. Now what that's going to do is it's going to hide the welcome message for anybody that's logged in. Go ahead and log in here and the welcome message disappears. Now why would I want to do that? Why does a logged in user need to be welcomed? They're already logged in. So, once again, modules? Unbelievably powerful. There are extensions that make modules even more powerful and we'll talk a little bit more about that in a little bit.
Tags: Joomla 3