Home > Articles > Web Development > HTML/CSS

  • Print
  • + Share This
This chapter is from the book

Summary

This chapter worked through four examples of templates, each time increasing the complexity and features. Here are the key points we looked at in this chapter:

  • Modern websites separate content from presentation by using a technology known as Cascading Style Sheets (CSS). In Joomla, a template and its CSS files control the presentation of the content.
  • When creating a template, it helps to have Joomla "running" on a localhost server so you can make changes at the file level with your favorite editor and refresh the page output in a browser to see the impact.
  • Creating valid templates should be a path, not a goal. The idea is to make a template as accessible as possible, for humans and spiders, not to achieve a badge for valid markup.
  • The most basic template simply loads the Joomla modules and mainbody component, preferably in source order. Layout and design are part of the CSS, not part of the template.
  • Modern web design uses CSS rather than tables to position elements. It's difficult to learn but worth the investment. There are many (non-Joomla) resources available to help.
  • Joomla consistently outputs specific elements, IDs, and classes in the code of a web page. These can be predicted and used to style the design using CSS.
  • The output of modules can be completely customized, or you can use the prebuilt output options, such as xhtml. All these options are called module chrome.
  • It's best to always use the fully expanded list options for menu output. You can then use many free resources on the Web for the CSS that will style and animate your menu.
  • Elements such as columns or module locations can be hidden (or collapsed) when there is no content in them. This is done using conditional PHP statements that control whether any code associated with unused modules and their container is included in the generated page; it is also done to link to different CSS styles to adjust the layout accordingly.
  • Creating a production Joomla template is more a question of graphical design and CSS manipulation than some special Joomla knowledge.
  • + Share This
  • 🔖 Save To Your Account