amariotti.com

  • about
  • blog
  • modules
  • portfolio
  • resumé
  • contact
Home

Recent blog posts

  • 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
  • Page Not Found on Node Creation
more

Blog tags

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

tips

Displaying CCK Data only in a Block (vs. in the node content) [UPDATED]

amariotti — Tue, 04/22/2008 - 14:51

I had a challenge that I wanted to share on my blog, so here it is. For my job I'm creating a new website with a page for each Program that we offer (i.e. Welding, Medical Assisting). There is a set of quick facts that need to be associated with each program, but only be displayed in a block in the sidebar. These include information that might be most important to potential students.

My original thought was, that views would be the best way to go. I would just create a block with the fields that I wanted, and it would display based on the NID on the program page they were on. While that sounded really easy, it actually wasn't as easy as that. The biggest trick was figuring out what Views Argument to use to tell it to check the NID first, then display the information. The attached .txt file is the views argument that ended up working.

  • drupal
  • tips
  • amariotti's blog
  • Read more
  • 8989 reads
  • 1 attachment
Syndicate content
  • about
  • blog
  • modules
  • portfolio
  • resumé
  • contact