2

Is there an existing sub-module or someplace i'm not looking for Display Suite to allow me to arbitrarily place the View, Edit, Revisions, Manage Display, Devel tabs that appear when viewing a Node... say I want to move them to a different place in any DS template like Right or Left.

1
  • Tabs are rendered in page.tpl.php, and ds operates on the entity rendering level. So if it can be done it would be interesting to see how. Commented Feb 9, 2015 at 4:53

1 Answer 1

0

After some looking around, I've found the following two approaches:

  1. Use DS's 'dynamic field'
  2. Use DS's 'preprocessor field'

Dynamic Field

  • Create a Dynamic Field (in /admin/structure/ds/fields) for Node entities.
  • Go to the 'manage display' of your content type and place the dynamic field somewhere.
  • Click 'Select Content' on the field settings (through manage display)
  • Select 'Page Elements'
  • Select Tabs, and save

Preprocessor Field

Not 100% working for me right now, however just to give the basic idea:

  • Create a preprocessor field in DS and add the field to your content type.
  • In your template.php file, instantiate the field:

    function YOURTHEME_preprocess_node(&$vars) { $vars['nameoffield'] = print render(menu_local_tabs()); }

I'm currently getting some errors with the preproccessor approach, however the dynamic field approach is working fine.

Your Answer

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

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