2012-04-28 37 views
2

我试图将不同的html(主题)应用于我的首页(index.html),而我的所有其他页面都具有相同的主题(index_in.html)。我想这样说,想知道为什么它不工作:plone.app.theming中的多个主题

从我rules.xml中摘录:

... 
    <theme href="index_in.html" css:if-content="#visual-portal-wrapper" /> 

    <rules css:if-content="#visual-portal-wrapper"> 

    <theme href="index.html" if-path="front-page"/> 
    <theme href="index_in.html" /> 
    ... 

谢谢

回答

2

尝试...

<rules css:if-content="#visual-portal-wrapper"> 
<theme href="index.html" if-path="front-page" /> 
<theme href="index_in.html" /> 
... 
</rules> 
1

如果首页有#visual-portal-wrapper,那么第一页也会匹配并使用它。有条件的主题按照它们出现的顺序进行尝试,并使用第一个匹配的主题。

+0

我生成的html似乎没有包含visual-portal-wrapper。我如何让它出现?我应该将主题放在Sunburst上吗? – emb03 2012-04-29 17:10:52

+0

您应该包含一个包含plone的正文类的规则,您可以在http://pigeonflight.blogspot.com/2011/11/common-diazo-rules-for-plone.html上找到该规则以及其他一些有用的提示。 – 2012-04-30 02:43:47