The next thing I wanted to do was take a copy of the index page, move it (and all its complicated layout) elsewhere, and put my own choice of content on the front page. Easy, right?
Except I could not find the front page anywhere!
What we do have is several distinct items which seemed to control content:
I haven't really investigated the bottom three on the list yet. The big question was: how do the top four combine to form the pages of the website? Fortunately, the answer turned out to be simpler than you might think -- while managing to be just a little complicated...
Take a look at the menu across the top of the page! (If you're viewing this on a small screen -- a smart phone, say -- you'll probably find that the menu has been transmogrified into a drop-down panel. Sexy, but slightly more difficult to view while reading this article!) As I type this -- and as the disclaimer says, things may have changed by the time you read it -- there are four Menu Items:
Cooking With Pete,
Lessons Learned, and
Gantry Menus. (The final one contains all the dummy data originally installed with 'Gantry' -- including the one-time index page, now under the title 'About Joomla'.)
If you hover your mouse cursor over the second and third items in particular, and take a peek at the status bar where it's showing you the destination of the link, you'll probably notice that the page it's taking you to roughly matches the menu name. In fact, it exactly matches the menu alias, which, if you don't specify manually when creating the menu item, will become a lower case, hyphenated version of the title. (That is, "Lessons Learned" will become "lessons-learned".)
So, it's simple, huh? The menu structure defines the page structure?
Well, yes and no. There is more to it than that -- and it is possible to have a page without a corresponding menu, such as, for example, this very page you are reading now. (Note that when the article has no corresponding menu item, the article id number is prepended to the URL.) However, we'll look into that in a minute.
Menu items are hierarchical: each Menu can have several Menu Items, and each Menu Item can have several child Menu Items, and so on. I'm not sure how many levels you can have -- but practically, any more than three levels is probably getting a little too clumsy.
Each Menu Item has a Type which, in general, defines the main page content. This can be anything from a single article (as per
Lessons Learned/A New Joomla Site) to a list of Articles in a particular category (
Lessons Learned) to a Category Blog (
Cooking With Pete) which can show off the first few lines -- the preview section (before the "Read More" mark) -- of all the articles in a category. And numerous other possibilities. Of course, some of the Types are not pages at all; "Menu Separator" and the like, for instance...
Let's talk about categories for a minute. Simply put, Categories provide a hierarchical structure which can be thought of as folders, where articles are the files. This article belongs to the "Lessons Learned" category. I have made the Category the same name as the Menu, but this need not be the case. Essentially, Categories enable you to group related articles. Menu types can be set to handle all Articles belonging to a Category (and optionally all (or some) sub-Categories.)
For instance, if you had a "Blog" or "News" category, and a page / Menu Item set up to display that Category in some way, all you would need to do is write a new Article, assign it to the appropriate Category, and BINGO, your new Article is now public!
It is worth putting some thought into your Category structure. I remember reading somewhere that getting that right up front was the key to having a smoothly-running site!
Blah, blah, blah! If Menus and Categories control the placement of, and means of accessing, the pages of your site, then the actual content -- this text that you're reading right now -- is an Article. Type it up, make it pretty (with different levels of Headers, bold and italic text, etc), add pictures, insert your Read More cut-off point and your Page Breaks, and you're done! Nested lists (both sorted and unsorted) and indentation levels provide most of what you're likely to need -- and if you want finer control, you can always turn off the WYSIWYG editor and directly edit the HTML. If you're keen!
One recommendation I would make is that you leave your Article set to Unpublished as you are typing it up. This way you can save it at any time without worrying that everyone will see an incomplete article. Once you're finished you can switch it to Published -- or you can even specify a "Start Publishing" time/date for it to be set to Published automatically (handy if you're going away, but want your (pre-written) daily Articles to come out as scheduled!)
As a side thought, do make sure that your user's timezone is correctly set!
Ah yes, images. There are two ways to insert images into your article: the "Image" button below the editing window, and the "Insert/Edit Image" icon above the editing window. (This is all assuming you are using the default Article editor, of course; there are at least two article editors provided, or you can work directly in the HTML.) The two methods work slightly differently -- but essentially, they give you similar options: provide the URL of an image, specify how to display it (ie, float left or right), and whether to give it a caption or not.
The "Image" button allows you to upload an image directly, and seems to place it in the
<Joomla>/images directory -- which is how I got Blenderella here. Whether you are happy with putting your pictures straight in the
images directory or not is up to you. The "Image" button also provides the option of browsing through the
images directory and sub-directories to find what you are looking for. The good news is, it seems to correctly use the relative path for these images, which means they will keep on working when you move the entire installation down to your site's root folder.
The other option, via the "Insert/Edit Image" icon, is to upload your image independently via your favourite FTP client, and use the full URL to the image to enable it to link it. If you do this, I think I would recommend placing your images in the
<Joomla>/images directory structure -- ideally with some structured directory tree that makes some kind of sense. (Thinking about it, I guess I'd recommend a directory structure that mirrors the Category structure -- but really, whatever works best is fine!)
On my Shiitake Chicken page, the image I used was actually loaded into an
images directory outside of the Joomla structure -- and looking at the code now, I see that it has still constructed a relative URL to the image, rather than the absolute one that I pasted in. Long story short, when I relocate these files down to root, that image will break! (Speaking of relative vs absolute links, I made a conscious decision to make the link I just inserted to be a relative link -- but I'm wondering what happens if the article moves for some reason. I wonder if there's any way to specify a link to an article by ID number, such that the link keeps working even if the site is reorganised? Will have to look into that... (Edit: I actually had trouble inserting a relative link. Let's try an absolute one!))
So, you've set up your Menu structure, your different Categories, and you've written a few Articles. Voila, one nice shiny new web page, n'est-ce pas?
Well, yes and no.
This Article that you are reading is the main content of this page, as defined by some combination of Menu, Category and Article as previously discussed. But what about the rest of the stuff in the page? The menu at the top (well, under the disclaimer for the moment -- and yeah, what about the disclaimer?) and the 'Gantry' copyright message at the bottom. What about that box to the right, with its list of articles in this Category?
Well, they're Modules! (In case the huge heading above didn't give it away!)
Everything we've covered up to now has been enough to produce a simple page. But without Modules, we would not have a workable site. Remember "Where Did My Menus Go?" from the last article? Menus, like everything else that is not part of the main body of a page, are held within Modules. Modules can be set to display (or not) on any particular set of pages (by which I mean Menus as discussed above!) They can be placed in any of the available Locations (as defined by the Template you are using.) And they can contain a wide range of content -- from simple user-defined HTML as in the disclaimer above, to complex hierarchical menus, to, well, you can see the complete list of possibilities when you click on "Create Module"!
So, therefore, the list to the right of this article is a Module which lists all Articles in a specified Category; placed in "sidebar-a". Easy, huh? I've given it a different shading type (by setting "Module Class Suffix" to "box2" in "Advanced Options" for that Module. And I've specified that it should only appear on the "Lessons Learned" and "A New Joomla Page" menu items.
But wait? I hear you say. Why are we seeing it on this page? I'm not entirely sure, but I think because this page is not defined by a Menu Item, it uses the Module visibility settings of its parent Menu Item. The other article, "A New Joomla Page", is defined by a Menu Item, and therefore that Module can be turned off or on independently of its parent page -- but this one only shows what "Lessons Learned" shows...
Okay, so how did I redefine the index page? For that matter, what is the index page?
Simply put, the index page is the start page is the home page. If you go straight to a website without specifying any additional path beyond the ".com" (or ".id.au" in my case) the page you see is the index page. I'm used to calling it the index page because that's the default name -- the default file that is loaded -- by Apache, the number one web server in use today. Other web servers use a different approach, of course, but that's what I'm used to.
So anyway, how did I move the Home page out to a new location and add my own content in the default position?
Well, there's one further piece of information (that I hadn't quite figured out at the time) that makes this quite simple. If you look at the Menu Items tab of the Menu Manager, you'll see a column called "Home". One row has a gold star in that column -- and that Menu Item is your home page. All you should have to do to move out the old and put in a new one is:
My approach was a little more involved than that, but that should work just fine.