We can distinguish three different ways in which the website generates information.
First, the initial load of the page before we click anywhere, when we only write the name of the domain (for example: www.joomla.org).
Second, when we click on a link in the page (an image, a button, text).
And the third, and the one we will be discussing here, is the one that loads after clicking on one of the menu items.
Before knowing what a “menu item” is, we are going to clarify that a “menu” is a Joomla extension, like modules and components. An extension with a special format which allows us from the back-end (www.mydomain.es/administrator) to give these items the necessary properties that when clicked cause “something” to occur.
In the image above we can see a menu (inside the red box), made up of six items which are all visible, and by default has the first item “selected”, which is called “Joomla”.
It is also possible with Joomla to easily add submenus inside another menu, as you can see in the next image inside the red box:
In this same image we can see that the item “EXTEND”, which is in the first level menu, has been clicked on (see above). This action has displayed a second level where we have placed our mouse over the menu item labeled “Resource Directory”. Since we have not yet clicked this item, no action associated with this item is triggered. So with the tree menu displayed on our main page we can still see the page by default, and not the one which will load when we click on “Resource Directory”.
In the image above we can see the page of the Joomla administrator where once a menu is selected it is shown so we are able to work on it. It doesn't seem complicated, a column to show if it is published or not, a title (and below that the action which should occur once clicked), and if it's the default page (be careful - more on that soon...). The next column indicates which type of users can see this menu item (public, registered, etc…). The next-to-last indicates the language which the user must have configured in his/her profile to see this item, and last but not least, a unique identifier (ID) for each.
When clicking on one of the menu items we see a page similar to this one:
The “Menu Item Type”, boxed in red, is the ACTION which will be triggered once we click on this item.
The variety of ACTIONS that trigger the item is very wide. Even without installing new components we are able to configure menu options to show all kinds of information in the main part of the template (review the the part “I” of the series of articles from the month of November of 2013) via the “Menu Item Type”.
Take a look for example at the possibilities available under “Articles”:
As you can see, you can make an item that when clicked on it will show only one article, all the articles in a certain category, or even a category blog, or a category list, etc...
We have identified that the menu is composed of items, and that when clicked they trigger an action which fills in information in the main part of our web page. But how do we fill in the rest of our site?
Do you remember what a module is? Is was the type of extension which allowed us to show information through a position in our template (except the main part, which we have just seen how to fill in with information).
One of the things that we can configure inside the modules is the position where we want to show this module in our template, as we can see in the next image boxed in red:
In the same window we can see that the modules configuration has a tab which is called “Module assignment”. Here we decide where we want the module to show, which could be on all pages, no pages, only the pages selected, or all pages except those selected. In any of these cases you have to indicate one by one which are the options of all the menus (which Joomla will kindly show you) that you want to trigger so that this module is shown when clicked on:
We almost have all the information that we need for our site to be complete.
Lets review what happens with the modules when we click on a menu item.
We click on a menu item and the action associated to this item creates the content of the main part. After the modules are configured, by clicking this menu they will be seen in the positions indicated in the template's parameters. We now have a web page loading in our browser!
If this was a bit complicated lets end with a little “magic”. Do you remember at the beginning we said there are three ways of creating a website? And about the first option we said something like “First, the initial load of the page before we click anywhere”? And further on we said “If it's the page by default(be careful..)”? The item menu which is set as default, and only one item out of all of the menus in our site can be default, is the page that your domain name will direct to (for example: http://www.joomla.org). So changing this option by choosing another item from any menu, the result would be to generate the new web page for our landing page.
If you'd like to hear more in this series I will be happy to continue, and if I have saturated you enough with "simple" things, for next month I will write something which will have to do with the world of development. You decide.