Skip to main content
Updated the technique under 'Create a view' to reflect Drupal 7 ways of doing things.
Source Link

There is no easy out of the box way to add the content of a node to different regions on the page. There is multiple ways to tackle this problem.

Non-coding way: Views & Blocks

Create a view

  • Type: Block
  • ArguementContextual Filter: nidContent: Nid
    • default value: grab from current page
  • Fields: Whichever you want
  • Filter:
    • Content Type: Seminar

(plus whatever additonal settings you want)

Then go to administrator block page Move the newly create view block, to the region you want it displayed. It should only display on the seminar node pages.

Repeat for all regions

Coding Way with theme_preprocess_region():

code would look something like this

MYTHEME_preprocess_region(&$variables) { if (isset($node) && ($node->type == 'seminar' )) { //add new variable here. } } 

This is for Drupal 7 only. Now its avaiable in your region.tpl.php.

There is no easy out of the box way to add the content of a node to different regions on the page. There is multiple ways to tackle this problem.

Non-coding way: Views & Blocks

Create a view

  • Type: Block
  • Arguement: nid
    • default value: grab from current page
  • Fields: Whichever you want
  • Filter:
    • Content Type: Seminar

(plus whatever additonal settings you want)

Then go to administrator block page Move the newly create view block, to the region you want it displayed. It should only display on the seminar node pages.

Repeat for all regions

Coding Way with theme_preprocess_region():

code would look something like this

MYTHEME_preprocess_region(&$variables) { if (isset($node) && ($node->type == 'seminar' )) { //add new variable here. } } 

This is for Drupal 7 only. Now its avaiable in your region.tpl.php.

There is no easy out of the box way to add the content of a node to different regions on the page. There is multiple ways to tackle this problem.

Non-coding way: Views & Blocks

Create a view

  • Type: Block
  • Contextual Filter: Content: Nid
    • default value: grab from current page
  • Fields: Whichever you want
  • Filter:
    • Content Type: Seminar

(plus whatever additonal settings you want)

Then go to administrator block page Move the newly create view block, to the region you want it displayed. It should only display on the seminar node pages.

Repeat for all regions

Coding Way with theme_preprocess_region():

code would look something like this

MYTHEME_preprocess_region(&$variables) { if (isset($node) && ($node->type == 'seminar' )) { //add new variable here. } } 

This is for Drupal 7 only. Now its avaiable in your region.tpl.php.

Source Link
iStryker
  • 4.5k
  • 2
  • 25
  • 44

There is no easy out of the box way to add the content of a node to different regions on the page. There is multiple ways to tackle this problem.

Non-coding way: Views & Blocks

Create a view

  • Type: Block
  • Arguement: nid
    • default value: grab from current page
  • Fields: Whichever you want
  • Filter:
    • Content Type: Seminar

(plus whatever additonal settings you want)

Then go to administrator block page Move the newly create view block, to the region you want it displayed. It should only display on the seminar node pages.

Repeat for all regions

Coding Way with theme_preprocess_region():

code would look something like this

MYTHEME_preprocess_region(&$variables) { if (isset($node) && ($node->type == 'seminar' )) { //add new variable here. } } 

This is for Drupal 7 only. Now its avaiable in your region.tpl.php.