drupal 中的视图模块
Drupal 中视图模块的用途是什么?
What are the uses of views module in Drupal?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
Drupal 中视图模块的用途是什么?
What are the uses of views module in Drupal?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
在最基本的层面上,视图是一个查询生成器。但它的作用远不止于此,因为它允许您管理查询结果的输出并将它们设置为页面、块、提要或可以使用其他模块扩展的任何其他数量的输出选项。
Views 是 Drupal 社区中使用最频繁的模块之一。据报道,目前有 270,290 个活动站点安装了该软件。
项目页面中使用视图的一些示例:
At its most basic level, Views is a query builder. It does much more than this though as it allows you to manage the output of your query results and set them up as pages, blocks, feeds, or any other number of output options that can be extended with other modules.
Views is one of the most heavily used modules in the Drupal community. It is currently reported as installed on 270,290 active sites.
Some examples of uses of Views from its project page:
我通常将其描述为“可视化查询生成器”,例如 user247245。在更简单的层面上,每当您需要站点中的数据“对象”(或其子组件)列表(无论是内容、用户、评论等)时,视图都非常有用。
视图可以像单个项目一样简单;例如,如果您想将一个特色故事随机插入到每个页面侧边栏的块中。视图允许您添加过滤器(按创建日期、按分类术语等)、指定显示(块、页面等)以及对输出进行主题化(在显示级别、行级别等)。
视图的许多功能源于它与许多其他模块集成的事实。它与 CCK 相得益彰,允许您根据需要灵活地输出 CCK 字段。还有许多其他模块添加了额外的显示类型,例如 lightbox 幻灯片、“手风琴", CSV导出,JSON 输出,轮播、日历等。
简而言之,如果如果您计划使用 Drupal,那么花时间学习使用视图将是值得的。
I usually describe is as a "visual query builder", like user247245. On a simpler level, Views can be useful any time you need a list of data "objects" (or their sub-components) from your site (whether content, users, comments, etc.).
A view can be as simple as a single item; for instance, if you want to have a featured story randomly inserted into a block on the sidebar of every page. Views lets you add filters (by date created, by taxonomy term, etc.), designate displays (block, page, etc.), and theme the output (at the display level, at the row level, etc).
A lot of the power of Views stems from the fact that it integrates with lots of other modules. It compliments CCK especially well, by allowing you to flexibly output CCK fields, as needed. And there are lots of other modules that add additional display types, such as lightbox slideshows, "accordions", CSV exports, JSON output, carousels, calendar, etc.
In short, if you plan to use Drupal, time spent learning to use Views will be time well spent.
它是一个可视化的“查询构建工具”,使您能够获取数据(节点)。
可以将其视为“重新发明”的 SQL。
It's a visual "query building tool", giving you the ability to fetch data (nodes).
Think of it as SQL "reinvented".
在更基本的层面上,您可以使用视图来创建页面或列表块。例如,带有标题和预告片的缩略图列表、用户列表、评论列表等。视图扩展了基本的 mysql 查询和获取行,因为您可以格式化行和字段的显示以满足您的需要。
乔
On an even more basic level, you use Views to creates pages or blocks of lists. Like, lists of thumbnails with headlines and teasers, lists of users, lists of comments, and etc. Views extends making basic mysql querys and fetching rows, because you can format the display of the rows and fields to suit your needs.
Joe
根据我的说法,无法在其他内容类型页面上显示一种内容类型的内容。但是通过使用视图,您可以非常轻松地做到这一点。您只需添加分类术语,并在此基础上您可以非常轻松地显示它。您只需要创建适当的关系,并为其应用上下文过滤器。
例如,
您有两种内容类型:
1.页面,
2.博客条目
现在如果想将页面相关的博客以块的形式显示在页面上那么除了创建视图之外没有其他办法了。这是一种非常简单的方法。
According to me there is no way to display one content type's contents on other content type page.. But by using views you can do it very easily.. You just have to add taxonomy terms and based on that you can display it very easily. You just have to create a proper relationship and have to apply the contexual filter for it..
e.g.
You have two content type :
1.Page,
2.Blog Entry
now if you want to display the page related blog on the page as a block then there is not other way than creating a view. and its a very simple way to do this.