Rules for Plone

Diazo rules for Plone.

Base Rules

<?xml version="1.0" encoding="UTF-8"?>
<rules
    xmlns="http://namespaces.plone.org/diazo"
    xmlns:css="http://namespaces.plone.org/diazo/css"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <!-- theme wrapper, to prevent theming ZMI -->
    <rules css:if-content="#visual-portal-wrapper">
      <!-- define Theme template for front-page -->
      <theme href="index.html" css:if-content="body.section-front-page" />
      <!-- define Theme template for other pages -->
      <theme href="article.html" />
      <!-- prevent theming if $ajax_load is true -->
      <notheme if="$ajax_load" />
      <!-- prevent theming manage-portlets view -->
      <notheme css:if-content="body.template-manage-portlets" />
      <!-- prevent theming usergroup-userprefs view -->
      <notheme css:if-content="body.template-usergroup-userprefs" />

      <!-- drop stuff from Template, which we readd below from Plone
      <drop theme="/html/head/meta" />
      <drop theme="/html/head/title" />
      <drop theme="/html/head/base" />
      <drop theme="/html/head/comment()" />

      <after
        content="/html/head/meta"
        theme-children="/html/head" />
      <!-- include plone javascript files -->
      <before
        content="/html/head/script"
        theme-children="/html/head" />
      <after
        content="/html/head/base | /html/head/comment()"
        theme-children="/html/head"
        />
      <!-- include plone kss files, but not css -->
      <after
        content="/html/head/link[@type='text/kss']"
        theme-children="/html/head"
        />

      <!-- copy id and dir attribute from Plone into Theme -->
      <copy
        attributes="id dir"
        css:content="body"
        css:theme="body"
        />

      <!-- merge css classes from Plone into Theme -->
      <merge
        attributes="class"
        css:content="body"
        css:theme="body"
        />

      <!-- copy Plone logo href into Theme -->
      <copy
        attributes="href"
        css:content='#portal-logo'
        css:theme="#portal-logo"
        />

      <!-- Personal tools -->
      <replace
        css:content="#portal-personaltools"
        css:theme="#portal-personaltools"
        />

      <!-- copy Plone site actions into Theme-->
      <replace
        css:content="#portal-siteactions li"
        css:theme-children="#portal-siteactions"
        />



    </rules>
</rules>