Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hoping to export my taxonomy display options into my module via features. Any plans?
Comment | File | Size | Author |
---|---|---|---|
#9 | features-taxonomy-display.png | 8.1 KB | pvhee |
#4 | taxonomy_display-1410576.patch | 8.44 KB | jonhattan |
Comments
Comment #1
codycraven CreditAttribution: codycraven commentedI didn't have any plans but I am 100% behind it now that you mentioned it. I haven't had any exposure to the Feature's API but I'm hoping it won't require too much reworking of the module.
Comment #2
firestonej CreditAttribution: firestonej commentedJust checking in on the status of Features integration. Any news? Any way we can help?
Comment #3
guillaumev CreditAttribution: guillaumev commentedI think that unfortunately it would be a bit of work since the module would need to use variables instead of the database to store its configuration, that way the export could be done using strongarm...
Comment #4
jonhattanhere we go with ctools exportables.
Notes:
* uses
taxonomy_display_fetch_taxonomy_display($machine_name)
as exportablesload callback
.* it is required for such function to return an object instead of an array. This is the biggest change to the module code.
* ctools exportable already manage serialized arrays.
Not much more to say.
Comment #5
codycraven CreditAttribution: codycraven commentedLooks fantastic from a visual review. I'll need to run through testing before committing. Hopefully someone else will be able to review also so that we can have it RTBC.
Comment #6
codycraven CreditAttribution: codycraven commentedjonhattan,
Just to give you an update I really like the code that you've done and am pretty much ready to commit it. I was really hoping someone would RTBC it.
If no one reviews it by next week I'll be committing and making a 7.x-1.1 release with it.
Comment #7
pvhee CreditAttribution: pvhee commentedCan confirm that this is working perfectly for deployment.
In your feature, simply add the following line in the .info file to export the taxonomy_display settings
features[taxonomy_display][] = your-taxonomy-machine-name
Would be great if this could get committed and part of the next release of taxonomy_display, since the last stable release is pretty old.
Comment #8
codycraven CreditAttribution: codycraven commentedjonhattan and pvhee,
Is there anyway to include the
features[taxonomy_display][] = your-taxonomy-machine-name
line in the features export?If not, is this a step we will need to make public for those looking to use features? I'm not familiar with the features module myself.
Comment #9
pvhee CreditAttribution: pvhee commented@codycraven: this is automatically done by CTools, so no need to document other than "it is features-exportable".
To export it, you can then either select the taxonomy display for your vocabulary using the Features UI (see attached screenshot), or adding the line yourself in the .info file of the feature, as explained in #7
Comment #10
codycraven CreditAttribution: codycraven commentedpvhee, thank you for the RTBC.
Comment #11
codycraven CreditAttribution: codycraven commentedAs a note I just discovered this issue causes a dependency requirement on CTools. I've created a new issue: #1807714: Features support requires CTools