标签列表在侧边栏中包含特殊字符(Blogger)
List of labels cointains special character in sidebar (Blogger)
是否可以在边栏中显示包含特殊字符“#”的标签列表?
我该怎么做?
谢谢你的帮助
更新
我在标签小部件中有这段代码。我必须在哪里替换您的代码?
我该怎么做才能显示正常列表而不是可折叠的?
谢谢
> <b:widget id='Label1' locked='false' title='Etichette' type='Label'
> visible='true'>
> <b:widget-settings>
> <b:widget-setting name='sorting'>ALPHA</b:widget-setting>
> <b:widget-setting name='display'>LIST</b:widget-setting>
> <b:widget-setting name='selectedLabelsList'/>
> <b:widget-setting name='showType'>ALL</b:widget-setting>
> <b:widget-setting name='showFreqNumbers'>false</b:widget-setting>
> </b:widget-settings>
> <b:includable id='main' var='this'>
> <details class='collapsible extendable'>
> <b:attr cond='data:view.isLabelSearch' name='open' value='open'/>
> <b:with value='true' var='renderAsDetails'>
> <b:with value='data:messages.labels' var='defaultTitle'>
> <b:include name='super.main'/>
> </b:with>
> </b:with>
> </details>
> </b:includable>
> <b:includable id='cloud'>
> <!-- Always display list format. -->
> <b:include name='list'/>
> </b:includable>
> <b:includable id='content'> <div class='widget-content'>
> <b:class expr:name='data:this.display + "-label-widget-content"'/>
> <b:include cond='data:this.display == "list"' name='list'/>
> <b:include cond='data:this.display == "cloud"' name='cloud'/> </div> </b:includable>
> <b:includable id='list'>
> <b:include data='{ buttonClass: "flat-button",
> items: data:this.labels, itemSet:
> "labels", itemsMarkup:
> "super.list" }'
> name='extendableItems'/>
> </b:includable>
> </b:widget>
更新 2
我以这种方式编辑代码,但我也显示包含数字的标签。
我怎样才能 select 只有包含“#”字符的标签?
谢谢。
<b:widget id='Label1' locked='false' title='Etichette' type='Label' visible='true'>
<b:widget-settings>
<b:widget-setting name='sorting'>ALPHA</b:widget-setting>
<b:widget-setting name='display'>LIST</b:widget-setting>
<b:widget-setting name='selectedLabelsList'/>
<b:widget-setting name='showType'>ALL</b:widget-setting>
<b:widget-setting name='showFreqNumbers'>false</b:widget-setting>
</b:widget-settings>
<b:includable id='main'>
<b:loop values='data:labels where (l => l.name contains "#" != )' var='label'>
<a expr:href='data:label.url'><data:label.name/></a><br />
</b:loop>
</b:includable>
</b:widget>
- 从 Layout 选项卡添加新的 Labels 小部件。
- 在 Theme 编辑器中找到
values='data:labels'
这个小部件,你会找到两个结果。
- 将两个结果替换为
values='data:labels where (l => l.name contains "#")'
。
评论后编辑:
撇号标记 '
呈现为 #39;
所以 contains
查询 returns true
.
<b:includable id='main'>
<b:loop values='data:labels where (l => l.name contains "#" and l.name not contains "#39;")' var='label'>
<a expr:href='data:label.url'><data:label.name/></a><br/>
</b:loop>
</b:includable>
是否可以在边栏中显示包含特殊字符“#”的标签列表? 我该怎么做? 谢谢你的帮助
更新
我在标签小部件中有这段代码。我必须在哪里替换您的代码? 我该怎么做才能显示正常列表而不是可折叠的? 谢谢
> <b:widget id='Label1' locked='false' title='Etichette' type='Label'
> visible='true'>
> <b:widget-settings>
> <b:widget-setting name='sorting'>ALPHA</b:widget-setting>
> <b:widget-setting name='display'>LIST</b:widget-setting>
> <b:widget-setting name='selectedLabelsList'/>
> <b:widget-setting name='showType'>ALL</b:widget-setting>
> <b:widget-setting name='showFreqNumbers'>false</b:widget-setting>
> </b:widget-settings>
> <b:includable id='main' var='this'>
> <details class='collapsible extendable'>
> <b:attr cond='data:view.isLabelSearch' name='open' value='open'/>
> <b:with value='true' var='renderAsDetails'>
> <b:with value='data:messages.labels' var='defaultTitle'>
> <b:include name='super.main'/>
> </b:with>
> </b:with>
> </details>
> </b:includable>
> <b:includable id='cloud'>
> <!-- Always display list format. -->
> <b:include name='list'/>
> </b:includable>
> <b:includable id='content'> <div class='widget-content'>
> <b:class expr:name='data:this.display + "-label-widget-content"'/>
> <b:include cond='data:this.display == "list"' name='list'/>
> <b:include cond='data:this.display == "cloud"' name='cloud'/> </div> </b:includable>
> <b:includable id='list'>
> <b:include data='{ buttonClass: "flat-button",
> items: data:this.labels, itemSet:
> "labels", itemsMarkup:
> "super.list" }'
> name='extendableItems'/>
> </b:includable>
> </b:widget>
更新 2
我以这种方式编辑代码,但我也显示包含数字的标签。 我怎样才能 select 只有包含“#”字符的标签? 谢谢。
<b:widget id='Label1' locked='false' title='Etichette' type='Label' visible='true'>
<b:widget-settings>
<b:widget-setting name='sorting'>ALPHA</b:widget-setting>
<b:widget-setting name='display'>LIST</b:widget-setting>
<b:widget-setting name='selectedLabelsList'/>
<b:widget-setting name='showType'>ALL</b:widget-setting>
<b:widget-setting name='showFreqNumbers'>false</b:widget-setting>
</b:widget-settings>
<b:includable id='main'>
<b:loop values='data:labels where (l => l.name contains "#" != )' var='label'>
<a expr:href='data:label.url'><data:label.name/></a><br />
</b:loop>
</b:includable>
</b:widget>
- 从 Layout 选项卡添加新的 Labels 小部件。
- 在 Theme 编辑器中找到
values='data:labels'
这个小部件,你会找到两个结果。 - 将两个结果替换为
values='data:labels where (l => l.name contains "#")'
。
评论后编辑:
撇号标记 '
呈现为 #39;
所以 contains
查询 returns true
.
<b:includable id='main'>
<b:loop values='data:labels where (l => l.name contains "#" and l.name not contains "#39;")' var='label'>
<a expr:href='data:label.url'><data:label.name/></a><br/>
</b:loop>
</b:includable>