3

In my full node display I want to show the same field twice, in a different mode each time.

Specifically, I have a collection of images, I want one up top and the rest below in my already existing gallery view of the node. What I don't know how to do is to show the field for my image twice in a single node display. Is there a module that will allow me to do this with a minimum of fuss?

1

2 Answers 2

9

Should be pretty easy if you use Display suite:

Add a dynamic field (admin/structure/ds/fields/manage_ctools) and select the entity type (node).

enter image description here

Your new field should be in the manage display tab of the entity type selected, activate it (put it in the section you want).

Click on the gear icon and then 'select content'

enter image description here

Then drill down in the options (node -> the field you would like to duplicate)

enter image description here

If you don't use display suite just print that field in a tpl.php file.

7
  • You lost me after selecting the Node checkbox.
    – CyberSkull
    Commented Nov 17, 2013 at 2:06
  • I created the field and I think I correctly referenced the entity, but I can't find it to insert it in admin/structure/types/manage/mynodetype/display
    – CyberSkull
    Commented Nov 17, 2013 at 2:24
  • 1
    I've added screenshots, sorry they are in french :) Commented Nov 17, 2013 at 10:52
  • The screenshots are a big help. And once upon a time, I could read French too. I can't seem to find the dynamic field in the Manage Display tab of the node editor.
    – CyberSkull
    Commented Nov 18, 2013 at 0:12
  • Sorry mate, can't really help you more than this Commented Nov 18, 2013 at 3:29
0

If you don't use Display suite for the given view mode, you can use https://www.drupal.org/project/entdispfieldui instead. (in combination with a number of other modules)

  • Choose a way to integrate 3rd party composer libraries: Either using composer_manager, or using https://github.com/drupal-composer/drupal-project
  • Download and enable entdispfieldui and required modules, including cfrplugindiscovery (shipped with cfr).
  • Scroll to the bottom of the view mode configuration page, create a new entdisp field, save.
  • Move the newly created entdisp field up to the place where you want it.
  • Configure the entdisp field as "Field with formatter", choose the field + formatter you like.
  • Alternatively, choose "Image with processor" or "Images" (for multiple-value), then choose the image field as the source.

I have a collection of images, I want one up top and the rest below in my already existing gallery view of the node.

This complicates the matter a bit. I am not sure if the usual formatter settings allow to specify which field items to display (e.g. only the first item, or all except the first). Something like this can be achieved with new custom renderkit components, but it depends a bit on your exact requirements.

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.