Hoping to export my taxonomy display options into my module via features. Any plans?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

codycraven’s picture

I 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.

firestonej’s picture

Just checking in on the status of Features integration. Any news? Any way we can help?

guillaumev’s picture

I 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...

jonhattan’s picture

Status: Active » Needs review
FileSize
8.44 KB

here we go with ctools exportables.

Notes:

* uses taxonomy_display_fetch_taxonomy_display($machine_name) as exportables load 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.

codycraven’s picture

Looks 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.

codycraven’s picture

jonhattan,

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.

pvhee’s picture

Status: Needs review » Reviewed & tested by the community

Can 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.

codycraven’s picture

jonhattan 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.

pvhee’s picture

@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

codycraven’s picture

Status: Reviewed & tested by the community » Fixed

pvhee, thank you for the RTBC.

codycraven’s picture

As a note I just discovered this issue causes a dependency requirement on CTools. I've created a new issue: #1807714: Features support requires CTools

Status: Fixed » Closed (fixed)

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