Moving Drupal fields to the sidebar

Don't you wish you could display some of the fields in the sidebar? Well, you can.

1. Change the display of the contenttype you want to use and hide the fields you do NOT want to display in the main content area. (/admin/structure/types/manage/page/display)

2. Go to views. (/admin/structure/views)
Create a new view of the type "block" and state that you want to show some "fields". Choose "continue and edit".
Set "fields" to list the fields you want to show in the sidebar (probably the fields you have hidden in step 1.). You can set "filter" to narrow the contenttypes. The "sort" does not matter, we are only going to select one node.
Go to "advanced" and configure a "contextual filter" for "Content: Nid". Set the "When the filter value is NOT available" value of "Provide default value" to "Content ID from url".
Save the view.

3. Go to blocks and configure your block to be shown in your sidebar. (/admin/structure/block)

Please let me know it this article helped you somehow.

Tags:

Share: