2

I am trying to output node fields in different theme regions, particularly a node reference field into my theme's right sidebar region. I have read this is possible with display suite and display suite extra modules, but I only see display suite regions (left, right...) and doesn't seem to be aware of my theme regions. How can I accomplish this?

3 Answers 3

2

Try the cck_blocks module. Once installed, you can enable field blocks per field via the field settings page.

Then in the display settings, hide the field in the default/full view and show it in the cck blocks view mode.

1
  • I already tried this solution and while it works it´s not exactly what I am looking for. What I want is to know how to use display suite to add fields to theme regions. According to drupal.org/node/1518286#comment-5854518 it should be possible in D7?
    – itsututa
    Feb 3, 2013 at 12:16
1

There's a few ways, but one reasonably simple way, still using theme regions, is with Views.

  1. Add a "Block" display to a View
  2. Add a "Contextual filter" for "Node ID"
  3. Set contextual filter "Default value" to "Content ID from URL".
  4. Add your entity reference fields etc.. to the View display and save.
  5. Set the block visibility on your node page.

The View will then pickup the node id and show the relevant fields from that node.

1
  • I had thought of that and got it working that way; I got it to work also with hook_page_alter, but still wanted this functionality to be done with display suite, only because I have read it is possible and would simplify the entire process?
    – itsututa
    Feb 3, 2013 at 12:09
1

Information on how to do this can be found in the Add fields to a block page of the Display Suite documentation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.