0
有許多貼有「label1」的帖子。這些帖子可能具有「label1」,「Label2」等標籤。僅在博客上有特定標籤的帖子上顯示特定的小部件
問題中的窗口小部件只有在標籤名爲「label1」的情況下才會出現在帖子中。
我試圖實現如低於上述使用lambda表達式,在小部件顯示/隱藏條件的典型方式:
<b:widget id='HTML38' locked='false' title='' type='HTML' version='1' visible='true'>
<b:includable id='main'>
<!-- only display title if it's non-empty -->
<b:if cond='data:blog.pageType == "item"'>
<b:if cond='data:post.labels any (label => label.name == "label1")'>
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
<b:else/>
/* Thing to do otherwise */
</b:if>
</b:if>
但是,這並不表明小部件的任何職位,甚至上崗與期望的「label1」。
這是否可以使用lambda表達式或其他方式實現? 如果是的話,是有可能有一個小部件出現任何「LABEL1」和「LABEL2」
很新的XML &編碼,&希望得到任何幫助