Hello,

I need some token support in my Display Suite region classes. It is very useful, if you want to add the id of the entity as class to the wrapper, so you can reference these with css.

A patch is already ready, I will post it in a few minutes.

Comments

axe312’s picture

Status: Active » Needs review
StatusFileSize
new2.73 KB
axe312’s picture

StatusFileSize
new2.4 KB

Here is a new version of the patch. It's now also working with nodes and I removed some code from linked_field, where I copied the token integration from.

willowdigit’s picture

You are absolutely right, this is a useful feature you have added. It would be nice to see it for attributes as well, especially to enable fragment identifiers, although it is easy enough to implement using a code field.

But apart from that I have used this feature and for me it worked well.

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Moving this to RTBC so I notice it...
Interesting use case... :)

Give me a few weeks to test and commit this.

axe312’s picture

Great to see progress here :)

axe312’s picture

Whats the status over here?

  • aspilicious committed 6175f91 on 7.x-2.x
    Issue #2288345 by axe312: Added token support for region classes.
    
aspilicious’s picture

Version: 7.x-2.x-dev » 8.x-2.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed to the 7 branch. It would be awesome if you could also make a 8.x patch.
Although token tree doesn't exist yet.

ergophobe’s picture

This actually causes a notice to be thrown for Fieldable Panel Panes.

See #2376377: DS 7.x-2.7 token support throws notice for fieldable panel panes

Hjarnmastara’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new7.78 KB

Ported the patch to d8.

Hjarnmastara’s picture

StatusFileSize
new7.99 KB

Add annotations for the vars in DsFieldLayoutBase.php.
Changed Entity to EntityInterface to be more correct.

Cheers

aspilicious’s picture

Status: Needs review » Fixed

Did some minor doc changes. And removed all the ugly TODO's from the interface.
Major thnx for all the help.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.