Introducing XWeb

Using banners for sections and entries

The generic stylesheet supports two types of banners: a section banner and an entry banner. Both will be places above the main text and to the right of a navigation at the left, if both are used at the same time the section banner will be above the entry banner.

The banners are created in the same manner as the buttons. You attach images with special type names to a section or an entry and the stylesheet will pick them up and insert them into the pages. The types searched for are:

sectionBanner
A banner used on every page of a section, it has to be in a <sectionStyle>
entryBanner
A banner different on each page, it has to be in a <documentStyle>

Similar to the buttons you can extend the names to use different banners in different sections, continuing the example from the last page you could add banners to your site like this:

  <layout>
    <sectionStyle type="users">
      <image type="normalSectionButtonUsers"/>
      <image type="activeSectionButtonUsers"/>
      <image type="sectionBannerUsers"/>
    <sectionStyle/>
    <sectionStyle type="dev">
      <image type="normalSectionButtonDev"/>
      <image type="activeSectionButtonDev"/>
      <image type="sectionBannerDev"/>
    <sectionStyle/>
    <documentStyle type="xhtml-users">
      <xsl stylesheet="layout/generic.xsl" navigationElement="html">
        <parameter name="stylesheet.id" value="userStyle"/>
      </xsl>
      <image type="normalEntryButtonUsers"/>
      <image type="activeEntryButtonUsers"/>
      <image type="entryBannerUsers"/>
    </documentStyle>
    <documentStyle type="xhtml-dev">
      <xsl stylesheet="layout/generic.xsl" navigationElement="html">
        <parameter name="stylesheet.id" value="devStyle"/>
      </xsl>
      <image type="normalEntryButtonDev"/>
      <image type="activeEntryButtonDev"/>
      <image type="entryBannerDev"/>
    </documentStyle>
    <!-- now rendering information for twelve buttons goes here:
         8 buttons plus 4 banners (section/entry * users/dev) -->
  </layout>

This will create two banners on each page. The upper one will have only two versions: one with the text "Users" and one with the text "Developers" (the section names, you could use titles if you want), while the lower one will always display the page name or title, with a different look in each section.