Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Using a nid argument in a block view in Drupal 6

Parent Feed: 

I had a bit of an issue with this since I'm used to using arguments on view pages.  To use node id as an argument with a block view you cannot simple use the "Hide view / Page not found (404)" under "Action to take if argument is not present".  Instead, do the following:

  • Select "Provide default argument" under "Action to take if argument is not present"
  • Select "Node ID from URL"
  • Save your view and include your block on the targetted pages

This way you'll be able to pass the nid argument in your URL to the block view.  Whew!

Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web