Start learning with our library of video tutorials taught by experts. Get started

Joomla! 1.5: Creating and Editing Custom Templates
Illustration by

Making the news more interesting


From:

Joomla! 1.5: Creating and Editing Custom Templates

with Jen Kramer

Video: Making the news more interesting

Now that we have taken care of our content styling for the site, I am back on the homepage and I am looking at the module that is on the left side of the page for Latest News. You will notice though, that some of the changes that we made in our last movie have already taken effect here on the homepage. So instead of the 'Bliss No. 5 All Natural Chocolate' being small letters and black, they have taken on the white Georgia look that we assigned else where on the website. But right now I would like to concentrate on the Latest News code over on the left hand side of the page.

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
Joomla! 1.5: Creating and Editing Custom Templates
2h 11m Intermediate Dec 02, 2008

Viewers: in countries Watching now:

Custom templates are the key to making a Joomla!-driven website stand out. In Joomla! 1.5 Creating and Editing Custom Templates, Jen Kramer McKibben offers instruction and insight to help Joomla! users create eye-popping websites. Jen starts with the basics, like how to add the Joomla! template codes to a static HTML layout, install the template package, and clean up styling after installation. She also shows how to make multiple layouts within the same Joomla! template, configure menus and submenus, and more. Exercise files accompany the course.

Topics include:
  • Converting HTML comps to Joomla! templates
  • Troubleshooting installation problems
  • Creating XML and index files
  • Placing random images
  • Configuring menus and submenus
  • Changing the favicon
Subjects:
Web CMS Web Development
Software:
Joomla!
Author:
Jen Kramer

Making the news more interesting

Now that we have taken care of our content styling for the site, I am back on the homepage and I am looking at the module that is on the left side of the page for Latest News. You will notice though, that some of the changes that we made in our last movie have already taken effect here on the homepage. So instead of the 'Bliss No. 5 All Natural Chocolate' being small letters and black, they have taken on the white Georgia look that we assigned else where on the website. But right now I would like to concentrate on the Latest News code over on the left hand side of the page.

The best way to start by looking at this is to view the HTML once again. And let's just once again Ctrl or Command+F and we are going to find Latest News, which we see down here. We have a surrounding div called left and another div inside of that called moduletablenews with an h3 for the latest news. And then we have some table based content that contains the actual title of the article, and then the body of the article after that.

The table content here is left over from the original version of Joomla!, which was very heavily table based. And the Joomla! team is working on getting rid of all these various tables in future releases. But for right now, we are going to have to deal with them that they are here. So first of all, let's go back to our main look of the website here and let's use this Web Developer toolbar to start by outlining our various block level elements on this page. So one of the things that you can see is that some of the surrounding divs go all the way across the left hand side, right on about even with the edge of the pink bar here. That's a little bit wide and I think we want to narrow that up a little bit, between the Latest News and the news over here on this side of the page.

Also to put more emphasis on the text on the right hand side of the page, I think we want that text to be a little bit larger so we want to reduce the size of the text over here on the left hand side to make it a little bit smaller just in this Latest News area. We will also want to restyle the Latest News title itself, which is just that default h3 which is a little bit ugly, and we will want to put a little bit of space here between the image and the main text itself. We can do all of this with just a few styles. So once again, let's flip back to our HTML view, and if we look at the div of the class of moduletablenews, this goes completely around both articles. So a great way to reduce the size of the whole left hand column, is going to be to resize that moduletablenews to a smaller dimension.

We will refresh the page here to get rid of all these outlines, and then I am going to go to CSS > Edit CSS and to the Default tab. And I am going to find the part of my style sheet that starts to talk about the left side of the page. And then I am going to add to this, left div.moduletablenews, which is the name of that big div that goes around all of the text for the latest news. I have played around with some widths a little bit and when I decided that a width of 240 pixels is going to work well for this.

So as you see that comes in just a little bit. I would also like to make the font size of everything overall a little bit smaller. So let's make the font size of 0.85 ems. Again, I have done some of this trial and error ahead of time. And finally we need some padding clearly here, in this particular view. Let's add some padding. Remember your CSS shorthand. T, R, B, L is the order, the top, the right, the bottom and the left, which stands for trouble. If you remember the accurate, then you will stay out of trouble.

That's our quick shorthand for padding. So we need to have 30 pixels on the left, 0 pixels, 0 pixels, and 20 pixels. And now put that in a nice position there in the web page. Next let's take care of that big heading for the Latest News overall. So once again, we want to pound left, a div.moduletablenews, and then this is the h3 that's located within that div. The reason I am being this specific is because I may have an h3 elsewhere on the site that I want to look slightly different. But the one for the module table news, I want to look this way.

So once again, I think I would like to make its color to be white and to keep with the rest of the look of the site, let's also make it Georgia again. And maybe the font weight is a little bit much over here. Let's make the font weight normal. That looks wonderful. We definitely need a little bit space between those images and the small articles. Let's add a style for that, #left div.moduletablenews img, and I am just going to put a quick little margin around those images.

I would like a bit of a margin to the right side of the image and maybe a little bit on the bottom as well. That looks fabulous! The last thing we have is to take care of all those titles, The Return of the Bliss Bar and the Bliss Boxes. They don't really stand out; they just blend in with the rest of the text. So I think we need a little bit of a style to make those titles stick out a little bit more. But we don't want then too big because we don't want it to compete with the words Latest News. So once again, #left. contentehadingnews, which is the tittle of those headlines.

Let's try making them bold. Well, I think that is really all we need there. If I make them white, they are going to compete too much with the Latest News. So let's close off the style and I am pretty happy with the way this looks. Once again, I am going to Ctrl or Command+A, select everything, Ctrl or Command+C to copy, switch back to the my back end of Joomla!, and I am going to edit the style sheet once again, the default style sheet. Ctrl or Command+A, Ctrl or Command+V, and save.

And when I flip back to the site here and refresh, all of our styles have taken effect. Styling the news is exactly the same path as styling the content. Once again we wanted our content to be a little bit more prominent and a little bit bigger than our Latest News over here on the side. So we made the text a little bit smaller and we kept the colors to black so that they would blend in with the background a little bit better, and we use white very sparingly. It's also always nice to put a little bit of space between your image and the text itself. Well, just a little bit of breathing room really makes things a look lot better. Use these same rules on your sites.

Find answers to the most frequently asked questions about Joomla! 1.5: Creating and Editing Custom Templates.


Expand all | Collapse all
please wait ...
Q: When creating and uploading custom templates as described in Joomla! Creating and Editing Custom Templates , the following error occurs:

XML Parsing Error at 1:1. Error 4: Empty document
JInstaller::install: File '/tmp/install_4bd887e090339/css/default.css' does not exist.


What is causing this error?
A: Check through the errors described in the “Fixing typical installation problems” video (e.g. files included in the install package that are not listed in the XML file; the XML file lists files that are not in the install package; XML is badly formed). Also check for permissions issues with your server.
In all likelihood, if this message appears, there is an error with the XML file, possibly a typo or a misnamed file. Make sure the CSS file is called default.css and is located in the CSS folder. Also, make sure everything is spelled correctly.
 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

join now Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Joomla! 1.5: Creating and Editing Custom Templates.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Notes cannot be added for locked videos.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.