plonediazo

How to use a common header alternative pages using diazo


I have two static html files, one is a design for a homepage, the other is a design for a regular page.

I have a rules to determine which one to use, like this:

<rules css:if-content="body.section-front-page">
    <theme href="home.html" />
</rules>

<rules css:if-not-content="body.section-front-page"
       css:if-content=".portaltype-document">
    <theme href="index.html" />
</rules>

Though I am realizing now that these two pages have common elements, such as the header. Is there a way to use the header from one page or something, that means if I make changes to the htmlt, it only needs to be done in one place? Another way of asking, can you mix together design files?


Solution

  • You would need to have just the one theme file to do that.

    If you design the theme file properly and you do have common elements between the home page and the other site page templates this should be quite possible.

    I guess the design is key here... the following site uses one theme file but has a very different home page using rules similar to your css:if-content="body.section-front-page" to determine not to show the left and right columns for example.

    http://www.lotterywest.wa.gov.au/