简体   繁体   English

Drupal-如何显示X类型的N个节点?

[英]Drupal - How to display N nodes of a type X?

如何显示X类型的N个节点?

Use the Views module. 使用“视图”模块。 You'll have a solution in 5 minutes. 您将在5分钟内得到解决方案。

For PHP code, Blocks: 对于PHP代码,块:

See: http://drupal.org/node/30967 (Display (x) recent nodes (with teasers) of a specified type from a specified taxonomy term) 请参阅: http : //drupal.org/node/30967 (显示(x)来自指定分类术语的指定类型的最近节点(带有预告片))

or 要么

Go to the Admin>Site building>Views Add a new view Add a new Block display Change the style as you prefer my suggestion is to go Under Basic settings change Style to Html List Add new fields like Node: Title and link the field to the node Go to the Filter section to filter out the nodes you don't want displayed. 转到“管理”>“站点建筑”>“视图”添加一个新视图添加一个新的“块”显示根据您的喜好更改样式我的建议是在“基本设置”下,将“样式”更改为“ HTML列表”,添加诸如“节点:标题”的新字段,并将该字段链接到节点转到“过滤器”部分以过滤出您不想显示的节点。 Go to the Sort criteria and sort Node:Post date 转到“排序条件”并排序“节点:发布日期”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM