Chapter 14. Advanced Template and CSS Tricks
WHAT'S IN THIS CHAPTER?
Conditional statements and optional regions
Exceptions for the home page
Template overrides
Understanding suffixes
Advanced templating examples
Now that you've built your first template, you are probably wondering about some more advanced tricks. For example, you have a right column in your template; however, on some pages, no modules are assigned to that area. You still have a right column with nothing in it. Wouldn't it be nice if that column could go away?
It can! With a little PHP magic, you can remove columns and do many other things to add sophistication to your templates. Throw in some cool CSS tricks, and you are on our way to a very professional-looking — and behaving — template.
This chapter is full of goodies for taking your templates to the next level. You'll learn how to incorporate multiple layouts in the same template, share stylesheets across templates, work with suffixes to do some very customized styling, and see a few examples of real sites using these techniques. As with the previous chapter, all files are available at wrox.com
.
USING CONDITIONAL STATEMENTS AND OPTIONAL REGIONS
A conditional statement is one that tests to see whether something is true. If something is true, the code does one thing. If something is false, the code does something else.
An "optional region" is a term I borrowed from the Dreamweaver lexicon. In Dreamweaver, an optional region is a region in a template that can be enabled or ...
Get Joomla!® Start to Finish: How to Plan, Execute, and Maintain Your Web Site now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.