Deliverance

Deliverance erlaubt Gestaltungen auf Inhalte nach bestimmten Regeln anzuwenden.

  1. Deliverance kann einfach in einem Repoze-Projekt installiert werden mit:

    $ sudo easy_install Deliverance
    
  2. Anschließend wird in etc/zope2.ini im Abschnitt pipeline:main deliverance hinzugefügt:

    [pipeline:main]
    pipeline = egg:Paste#cgitb
               egg:Paste#httpexceptions
    #           egg:Paste#translogger
               egg:repoze.retry#retry
               egg:repoze.tm#tm
               egg:repoze.vhm#vhm_xheaders
               errorlog
               deliverance
               zope2
    
  3. Dann wird ein neuer Abschnitt eingefügt:

    [filter:deliverance]
    paste.filter_app_factory = deliverance.wsgimiddleware:make_filter
    theme_uri = http://www.veit-schiele.de/frontpage
    rule_uri = file:///%(here)s/rules.xml
    
  4. Schließlich wird die Datei etc/rules.xml mit folgendem Inhalt erstellt:

    <?xml version="1.0" encoding="UTF-8"?>
    <rules xmlns:xi="http://www.w3.org/2001/XInclude" xmlns="http://www.plone.org/deliverance">
      <prepend theme="//head" content="//head/link" nocontent="ignore" />
      <prepend theme="//head" content="//head/style" nocontent="ignore" />
      <append theme="//head" content="//head/script" nocontent="ignore" />
      <append theme="//head" content="//head/meta" nocontent="ignore" />
      <append-or-replace theme="//head"
                         content="//head/title"
                         nocontent="ignore" />
      <replace theme="//body//div[@id='content']"
               content="//body//div[@id='content']"
               nocontents="ignore" />
    </rules>
    
  5. Nach dem Neustart der Zope-Instanz mit:

    $ ./bin/paster serve etc/zope2.ini
    

    sollte die Plone-Site nun das Motiv meiner Website übernommen haben:

    Deliverance-Motiv