Drupal Views 公开了作者姓名过滤器
我有一个视图,我想添加作者姓名的公开过滤器。所以我可以过滤“John Smith”等创建的所有帖子。我似乎看不到它在过滤器下列出。这可以吗?
I have a view which I would like to add an exposed filter of the author name. So I can filter all the posts created by "John Smith" etc. I can't seem to see it listed under filter. Is this possible to do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这实际上比听起来要困难一些。您需要创建与“节点版本:用户”的“关系”,然后在过滤器部分下,选择“用户”类别并选择“用户:uid”,然后选择“使用关系...”
This is actually a little harder than it sounds. You need to create a "Relationship" to the "Node revision: User", and then under the filter section, choose the User category and pick User:uid, and choose "Use relationship..."
在
构建>下Views
(/admin/build/views
)user
),Expose
(靠近右边界)。Under
Build > Views
(/admin/build/views
)user
)Expose
in the filter configuration section (near to the right border).要使用视图应用过滤器,您可以按照以下步骤操作:-
=>进入管理设置
=>网站建设
=>意见
=>添加视图
=>编辑视图名称及其描述以及标签
=>在右侧添加过滤器
=>然后选择节点类型或
无论您选择什么,然后应用过滤器。
假设如果您选择节点上的过滤器,那么您可以选择发布的条件、类型等,完成此操作后,您可以从选项中选择节点类型(是其中之一)。
现在您可以在所需的类型或节点上应用过滤器。
For applying filter using views you can follow the following steps:-
=> Go to administer setting
=> site building
=> views
=> add view
=> edit the view name and its description also the tag
=> add a filter in right side
=> then select on which type of node or
whatever you choose and then apply the filter.
suppose if you choose the filter on node then you can select what condition either it is published, type, etc and after doing this you can choose your node type from option(is one of).
now you can apply filter on your desired type or node.