Closed (won't fix)
Project:
Display Suite
Version:
7.x-1.4
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Jan 2012 at 16:37 UTC
Updated:
7 Apr 2012 at 10:19 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedI am not to sure what you mean by "a field when the content is (still) the same as the default content?" what is the default content? in views if you pull in information from different sources and there is duplicate content you can select the "distinct" option in the advanced options under "Query settings"
Comment #2
peteruithoven commentedHi Bukem,
I'm sorry for being unclear. I tried to clarify my post.
In the settings of a field of a content type you can set the default content. I would really like an option for Display suite to not show the field when someone didn't change it's default value. Just like a field can be hidden when it's left empty.
I would like to try to fix this myself, but then some pointers on where in the code I need to start would be much appreciated.
Comment #3
peteruithoven commentedHi Bukem,
I'm sorry for being unclear. I tried to clarify my post.
In the settings of a field of a content type you can set the default content. I would really like an option for Display suite to not show the field when someone didn't change it's default value. Just like a field can be hidden when it's left empty.
I would like to try to fix this myself, but then some pointers on where in the code I need to start would be much appreciated.
Comment #4
Anonymous (not verified) commentedhmmm ..
You might be able to do this with hook_form_alter . I am not to sure but maybe if on the field you want you can add display hidden somehow if value = default
check out this screencast for an overview of hook_form_alter. I havnt found much other documentation for this hook but might be a solution for this
Comment #5
swentel commentedInteresting idea. You'll have to implement hook_entity_view_alter(), iterate over the fields in the $build, grab the field definition and compare default setting with current values. But that's not something currently I'd include by default in Display suite.
Comment #5.0
swentel commentedTried to clarify my post