我有一个RSS提要,它应该包括所有没有这些属性的帖子:
那是..。这些品质中的任何一个意味着它不应该出现在RSS提要中。
我试过这个:
<MTEntries category="NOT Appearances AND NOT Appearances_Archive" tag="NOT @conferencebox" lastn="15">但我知道这个错误:
Publish error in template 'RSS': Error in <mtEntries> tag: You have an error in your 'category' attribute: NOT Appearances AND NOT Appearances_Archive当我把它减少到:
<MTEntries category="NOT Appearances" tag="NOT @conferencebox" lastn="15">它如预期的那样工作(我得到了Appearances_Archive的帖子),但其他的被排除在外。
我试着重命名这个类别,这样它就不会有"_“,但这不能解决问题。
如果我把它改为:
<MTEntries category="NOT Appearances AND NOT appearancesarchive" tag="NOT @conferencebox" lastn="15">我没有得到一个错误,但RSS提要仍然包括“外观存档”的帖子。
这也不会得到错误,但不会像我想要的那样生成RSS提要:
<MTEntries category="NOT (Appearances OR appearancesarchive)" tag="NOT @conferencebox" lastn="15">我尝试过各种CamelCase、小写、带和不带"_“的组合。不走运。
版本:可移动的专业版5.2.3,附带:社区包1.92,专业包1.72
发布于 2013-10-10 05:02:54
是的,这是可能的,我相信你的第一次尝试应该奏效。
我用4.37测试了一个安装。这样做很好:
<mt:Entries lastn="10" categories="NOT Personal AND NOT Conversations">然后,我使用5.2.6Pro安装来重命名两个类别,并使用一个标记来匹配您的类别。我更改了标签,以匹配您的,但使基本名随机字符,以确保它不涉及基本名称。我能够发布您的确切片段,返回的条目似乎与预期的一样:
<MTEntries category="NOT Appearances AND NOT Appearances_Archive" tags="NOT @conferencebox" lastn="15">
<mt:EntryIfCategory><mt:EntryIfTagged><mt:EntryID> CATS: <mt:EntryCategories glue=","><mt:CategoryLabel></mt:EntryCategories> TAGS: <mt:EntryTags glue=","><mt:TagName></mt:EntryTags></mt:EntryIfTagged></mt:EntryIfCategory></mt:Entries>我检查了5.2.3是否是问题所在,但我不这么认为。lib/MT/Template/Tags/Entry.pm的差异在5.2.3至5.2.6之间没有实质性变化:
➜ Projects git clone https://github.com/movabletype/movabletype.git
Cloning into 'movabletype'...
remote: Counting objects: 91433, done.
remote: Compressing objects: 100% (27561/27561), done.
remote: Total 91433 (delta 63969), reused 89691 (delta 62257)
Receiving objects: 100% (91433/91433), 41.49 MiB | 811 KiB/s, done.
Resolving deltas: 100% (63969/63969), done.
➜ Projects cd movabletype
➜ movabletype git:(master) git diff 122a610d87e8fcc95b3534970d3d2346b88f8256 master -- lib/MT/Template/Tags/Entry.pm > diff.txt
➜ movabletype git:(master) ✗ cat diff.txt
diff --git a/lib/MT/Template/Tags/Entry.pm b/lib/MT/Template/Tags/Entry.pm
index c431b1a..89d5caf 100644
--- a/lib/MT/Template/Tags/Entry.pm
+++ b/lib/MT/Template/Tags/Entry.pm
@@ -1,4 +1,4 @@
-# Movable Type (r) Open Source (C) 2001-2012 Six Apart, Ltd.
+# Movable Type (r) Open Source (C) 2001-2013 Six Apart, Ltd.
# This program is distributed under the terms of the
# GNU General Public License, version 2.
#所以我现在不知道你为什么会有这个错误,但是我把这个作为一个答案,因为它回答了你标题中的问题!
你能提供一个链接到整个模板的文本吗?也许你已经安装了一个非标准插件的列表?
https://stackoverflow.com/questions/19284721
复制相似问题