1

How do I display specific nodes from a view on specific pages?

For example, I create a CCK field ("Display on node id:") for the content type Ads, and put there IDs of content type Basic page where I want display this Ads.

Is there to achieve this without additional modules?

1 Answer 1

0

Create a block display mode for that view (the view that display ads) and place that block on basic page node types.

In the view you should add a Contextual filter (under Advanced settings) and validate it as the node ID from URL. Then add a filter that selects only ads for that node ID.

2
  • Thanks, but don't work if enter multiply values in CCK fields ("Display on node id:"), example "10,19". Maybe need use "PHP code" validation?
    – mikelp9
    Sep 24, 2012 at 18:30
  • you enter multiple values delimited by "," ? There is an option in the field settings that allows you to add multiple values (you should select "Unlimited"). When you edit the node you'll have a button saying "Add more" or something like that, which loads another field to enter the new value Sep 25, 2012 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.