[英](Drupal 6 Views) How can I make a view that shows a list of specific nodes (by node id)?
I'd like to manually specify a view to show certain nodes. 我想手动指定一个视图以显示某些节点。
I can add a Node id filter (eg display if node id = 50), but I can make a multiple filters becomes they are "AND"'d (eg display if node id = 50 AND node = 51). 我可以添加一个节点ID过滤器(例如,如果节点ID = 50则显示),但是我可以使多个过滤器成为“与”(例如,如果节点ID = 50 AND节点= 51则显示)。
I'd prefer to not have to use taxonomy or whatever, as Im not currently using this. 我希望不必使用分类法或其他任何方法,因为Im目前未使用此分类法。 It would be easier to just manually code the view output if thats the case.
在这种情况下,仅手动编码视图输出会更容易。
What Googletorp says, but there is one more option: You can add an argument for Node:Nid, choose 'Provide default argument' - 'Fixed entry', enter the node ids separated with commas under "Default argument" and check the "Allow multiple terms per argument." Googletorp所说的话,但还有一个选择:您可以为Node:Nid添加一个参数,选择'提供默认参数'-'固定条目',在“默认参数”下输入用逗号分隔的节点ID,然后选中“允许”每个参数有多个术语。” box.
框。
Note that this will leave the option open to smart users to specify other node id's in the url, thus changing the output of the view. 请注意,这将使该选项向智能用户开放,以便在URL中指定其他节点ID,从而更改视图的输出。
You got some options. 您有一些选择。
50, 51, 52, 53
, then you can use between/range option in the filter. 50, 51, 52, 53
,则可以在过滤器中使用between / range选项。 3, 50, 340
, it's a bit more difficult, as the views UI doesn't allow OR queries. 3, 50, 340
,这是有点难度,因为意见UI不允许或查询。 You can either, use the views OR module Note it's still in dev version or you can create the query yourself with hook_views_query_alter
hook_views_query_alter
来创建查询。 You can use Views 3 (currently in alpha3 and quite stable). 您可以使用Views 3(当前在alpha3中并且非常稳定)。 It supports
OR
out of the box. 它开箱即用地支持
OR
。
But are you dynamically passing the Node Id's via an argument? 但是,您是否通过参数动态传递了节点ID? If not then why don't you consider using Nodequeue module?
如果不是,那为什么不考虑使用Nodequeue模块呢? It will allow you to precisely specify what nodes should be shown.
它将允许您精确指定应显示的节点。
Nodequeue works well in Views 2 and Views 3. Nodequeue在View 2和View 3中运行良好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.