Extending the PageLayout template
Remember the PageLayout
template developed at the beginning of this chapter? Well, that is a decent template, but let's extend it so it becomes a bit more realistic. Usually, a web template contains the sections title, login, search, logo, header, menu, left, center, right, and footer over and above the five sections that we have used. It would also be nice to have a template that allows us to do the following:
- Remove sections without side effects and without manually removing orphan CSS code (usually, you can remove a section by writing an empty
<ui:define>
tag, but this will not remove the corresponding CSS code for that section). Moreover, an empty<ui:define>
tag will still have a side effect of type the empty<div>
tag or the empty<span>
or<td>
tag. This happens because, usually,<ui:define>
is wrapped in a<div>
,<span>
, or<td>
tag. - Set the width of the template, that is, the left and right...