DeliveranceをWSGIFilterとして使う
まあ、entory-ponintがあるので、PasteDeployで設定しとこう
[filter:deliverance] use = egg:Deliverance#main theme_uri = file://%(here)s/deliverance/theme.html rule_uri = file://%(here)s/deliverance/rule.xml
とりあえずstatic-appで試そうとしたが、static-appがwith-filter指定を受け付けてくれない。
pipelineを組んだら回避できた
[app:staticapp] use = egg:Paste#static document_root = %(here)s/htdocs [pipeline:mainapp] pipeline = deliverance staticapp
Themeは以下のようにしてみた。
<?xml version="1.0"?> <rules xmlns:xi="http://www.w3.org/2001/XInclude" xmlns="http://www.plone.org/deliverance" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <replace theme="//span[@id='title']" content="//head/title/text()"/> <replace theme="//div[@id='main']" content="//div[@id='main']"/> </rules>
content側がtextじゃない場合はエレメントの種類が違うとメッセージも表示せずに落ちているような気がする。
content側bodyをtheme側のメインエリアdivに押し込もうとしてうまく動かない。
もうちょっと探る必要あり。