amariotti.com

  • about
  • blog
  • modules
  • portfolio
  • resumé
  • contact
Home › Blogs › amariotti's blog

Recent blog posts

  • Why I'm so excited about Rule.fm!
  • Reverse NodeReference Block - Revisited
  • CS4 Keyboard Issues
  • Text Formatter Module
  • Cool Apache ReWrite Trick
  • New RSS Feed
  • Find My iPhone
  • Congratulations, Drupal!
  • Re-Launched on Drupal 6
  • Copying + Pasting from Word into Drupal
more

Blog tags

cck design drupal drupal 6 drupal issue liquidweb module modules that I love os x random software views
more tags

Reverse NodeReference Block - Revisited

amariotti — Fri, 05/28/2010 - 09:27

A while back I wrote a post on how to create a reverse nodereference block using Views in Drupal 5. It's been easily one of my most visited pages on my site (which still isn't a lot, buy hey!). Anyway, in light of that I decided it was time to write one for anyone needing to learn how to do it in Drupal 6. Just a spoiler...it's a lot easier!

After you've created your view to display the data that you want, now it's time to add your argument. Go to the argument box on your view and add the nodereference cck field that you'd like to act as the primary argument for your block. Once you've done that on the settings for that field select "Provide default argument," then under your settings for that select "Node ID from URL." Now, my first thought was, "but what if my Node ID isn't in my URL?" Well, it's actually a lot smarter than that and just goes based on the Node ID whether it's in the URL or not. Since we're using a block the only arguments are coming from which Node ID you are accessing.

  • cck
  • drupal
  • drupal 6
  • views
  • amariotti's blog
  • 286 reads
  • about
  • blog
  • modules
  • portfolio
  • resumé
  • contact