开发者

Separating nodes

I am开发者_开发技巧 sure this is a simple fix, but cannot manage to work it out. I want to show a teaser only on a single node for my content type (e.g., node/1), and not all nodes within the content type. How would I do this?


There are many ways to do that, depending on what you actually want.

  1. A way would be to have two content types, one for node/1 and one for the other.

  2. You could also solve this from node edit: when you edit the node/1, create a teaser and a full view, but for the others, create just a full view (no teaser). In this case, the other nodes will appear in full view even in lists of nodes.

  3. You can alter the node view inside a hook_nodeapi (in Drupal 6) or hook_node_view (in Drupal 7) and force the full view of the node for any other nodes of a certain type, but not node/1.

  4. Another way of doing this would be to also force the full view for the other nodes except node/1, but in a hook_preprocess function...

Maybe if you describe what you need in a more detailed context, then we can find other ways of doing this...

Vasi.


Create two different displays of the view. On the first, make it a block, and set it to display only one item with the teaser. On the second, don't include a teaser and set the offset (under "items to display") to 1.

Make the first block display above the second display.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜