Upgrade Your Drupal Skills

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

See Advanced Courses NAH, I know Enough

Views Attach – putting views into CCK

We wanted to pass information to a view from a node and have the results pulled together inline.  Using node reference CCK fields to pass our arguments along w are able to make the edit and review process simpler for our team.  For the Quick video here is your link http://www.youtube.com/watch?v=TdrugF9pAfU

Adding the token for a referenced node

Adding the token for a referenced node

We also set the build mode to “Edit page” as well as “Full Node” for convenience in editing.

Views Attach build modes

Views Attach build modes

now we can add all the fields we need from the referenced node and have them appear in your full node and node edit pages.

We have chosen to use a token from the node – a node reference field – as our argument that we pass along to the view.

The view loaded into the content type

The view loaded into the content type

The views is loaded into the content type which makes it pretty simple to organize.

The final output has our tabled view inserted into our content = yay ;)

Attached table view in our content

Attached table view in our content

Author: 
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