Lots of good stuff comes from supporting Entity module's property info, but the main one for me is that some code I'm writing now and get and set the metadata of a node programmatically nice 'n' easy!
Patch to follow.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | metatag-n1817620-9.patch | 2.4 KB | damienmckenna |
Comments
Comment #1
jamsilver commentedPatch attached.
Comment #2
jamsilver commentedAh OK - here's one which has sensible descriptions on the properties.
Comment #3
jamsilver commentedAnd finally - one that actually works =p
Comment #4
damienmckennaInteresting idea. Could you please extend this to at least cover all of the meta tags from the main module? Thanks.
Comment #5
dave reidYeah, this cannot be committed as-is having the list of meta tags hardcoded. This needs to retrieve available meta tags from the API.
Comment #6
tauno commentedRe-worked to not hardcode the list of metatags that are available. One @todo is noted in the patch still. The property is being added to all entities instead of just entities where metatags are enabled because metatag_entity_supports_metatags() isn't returning the correct result inside metatag_entity_property_info_alter().
Needs more work.
Comment #7
damienmckennaComment #8
damienmckennaRerolled. Should this be moved into a separate file?
Comment #9
damienmckennaDoes this work too?
Comment #10
damienmckennaNeeds to be updated to check against metatag_entity_supports_metatags().