2011-12-14 45 views
3

我的工作路徑上有多個主題基地網站:重氮:如果沒有如果路徑

<rules if-path="//"> 
    <theme href="index.html"/> 
</rules> 

<rules if-path="/news"> 
    <theme href="news.html"/> 
</rules> 

<rules if-path="/Members"> 
    <theme href="news.html"/> 
</rules> 

... 

現在我有我想申請規則,如果路徑是/新聞 。 我該如何做到這一點?

回答

2

的重氮的全新版本的發行說明:

1.0rc4 - 2011-11-02添加@支持,如果,不和@ IF-沒有內容。添加對包含規則指定模式的支持。保留主題中html標籤前後的註釋 。關閉#12249。修復quote_param 始終使用lxml.etree.XSLT.strparam。處理不帶 主題的規則文件以允許刪除或替換內容。

http://pypi.python.org/pypi/diazo

附:解決方案可能是if-path =「not(/ news)」

+1

只需注意,該解決方案不是「if-path =」not(/ news)「 - 它只是匹配包含路徑段」not(`後跟路徑段`news「)的任何路徑, `。 – 2011-12-18 20:59:49

相關問題