Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I think this module could benefit from such a feature. Currently one has to create a view just to be able to do something like this, when it seems that it's a logical thing to do to a field in any context. Seems like a really good fit. What do others think?
Comments
Comment #1
swentel CreditAttribution: swentel commentedThat's a nice idea, but that's absolutely not in the scope of this module.
Comment #2
hazah CreditAttribution: hazah commentedReally? I won't argue, but that is actually quite surprising to read. May I ask why not?
It seems that the current custom field administration that DS already provides (admin/structure/ds/fields) are already more complex. This one whould have been a simple transform of an existing value (simple is a loose term here).
Anyways, very curious to understand why the scope does not match, if you have time to explain.
Cheers
Comment #3
Kristen PolThis would be pretty awesome. Would be curious as to the details as to why it's not a good fit too ;)
Comment #4
arbel CreditAttribution: arbel commentedI totally understand how this wouldn't be in the scope, but it this feature would simply be awesome, Views rewrite results is so powerful and its exactly what's missing from display suite IMHO.
Comment #5
johnhorning CreditAttribution: johnhorning commentedI love this module, but also agree that a rewrite feature would be nice. If not, can you suggest an alternative?
In my case, I would like to combine 2 fields onto one line.
John
Comment #6
hazah CreditAttribution: hazah commentedAtm, Views or Panels will do the trick. Personally I think it's overkill for some small sites though, hence the original thought.
Comment #7
aspilicious CreditAttribution: aspilicious commentedAs said before not in scope...
Comment #8
johnhorning CreditAttribution: johnhorning commentedI found a way to combine 2 fields into one. It's explained here:
https://drupal.psu.edu/content/using-display-suite-alter-fields
You'll need to have the Token module enabled for this to work. On the bottom of the Manage Display tab, click on Custom Fields, then select Add a Code Field. In the pop-up, select "Display Suite Code" as the text format, then check the checkbox next to "Token" and select from the token list that appears.
In my case the field code was:
print '[node:title] at [node:field-business-name]';
Since you can insert PHP code and HTML, you should be able to accomplish just about anything you need.
Comment #9
hazah CreditAttribution: hazah commentedThis isn't a request to fix anything. This is a feature request. And the question I have is why is this not in scope? That it isn't, is well understood. The reason, not so much.
Comment #10
hazah CreditAttribution: hazah commentedI'd like to point out that there seems to be another module coming from drupal.org itself that apparently does this. Can anyone else confirm?
https://drupal.org/project/token_formatters
Comment #11
fishfree CreditAttribution: fishfree commentedThis will be a very fantastic feature!