Using a View to diplay a single node/content in Drupal 7

Using the View module you can display nodes of any content-types.  Usually, in a “Page” type view you can display many contents/nodes, with pagination support. But what to display only a specific node? perhaps, using an url like where 10 is the Node-ID (nid)

You can achieve this using Contextual Filters. In this example, I’m assuming you want to display a single node of ‘Article’ content type.

1. First, create the View generally, simply in the way you’d create a view for displaying paged Articles. Next, like the image below, Click on Advanced > (Contextual Filters) add.


2. In the new window, type “nid” in Search text-field, select Nid as shown in the image below:

3. Look at the image below carefully, and apply all the changes marked.

4. Click on Apply. Contextual filter window will close.

5. Finally, on the main view page, click on Use Pager: Full under PAGER section (see image below).

6. On the new window, select “Display a specified number of items” and click Apply.

7. Type 1 in the “Items per page” text-field. Click Apply. The dialogue window will close.

That’s all. Hit Save on the main page.

7 thoughts on “Using a View to diplay a single node/content in Drupal 7”

  1. Thank you for the nice post Azam. But I have a question: what if you want to have a view that will render the view of your nodes without specifying a certain path in Views. By setting up a node/% path?

  2. hi how ru . i create a photo gallery using drupal 6 . let u know i am new in drupal. any how i display lots of image in a single div but now the burning question is this how give the detail look of small image . u just understand i want to click on image and image appear in a different look is it possible . then how .

Comments are closed.