Open erral opened 6 years ago
@rodfersou Twitter meta tags use the standard name
attribute of HTML5, OG protocol uses the RDFa extension and that's why they use the property
attribute instead; the scope of this PR is to be able to add/override OG metadata only. we can think later on how to do the same for Twitter.
BTW, @erral I would like to find a way to be able to dynamically add tabs to the control panel configlet (for third-party plugins, for instance); do you have any suggestion?
BTW, @erral I would like to find a way to be able to dynamically add tabs to the control panel configlet (for third-party plugins, for instance); do you have any suggestion?
@hvelarde we can show or hide the tabs dynamically with some lines of javascript code.
Would it be acceptable to allow lists to be values of the dict and then when rendering the template check the type of the value and if it is a list, render it properly?
@erral sound doable, but we will need to make the documentation a little bit more explicit then.
@rodfersou I think that's not needed right now; what we need is a way to add dynamically tabs to the configlet.
@rodfersou I think that's not needed right now; what we need is a way to add dynamically tabs to the configlet.
collective.plonetruegallery has a similar usecase: plugins can have configuration and if enabled it is shown in the control panel config.
@erral IMO that's way to complicated; we only need to do the same thing is done in behaviors to extend the configuration form.
I needed a way to extend the default metadata provided by the product, and implemented it using adapters.
To extend the default metadata, you need to provide an adapter for the given content type and return a dict with the extended metadata.
You can also override preexisting metadata (if you want to change for instance og:title or any other.
This idea of using an adapter comes from collective.opengraph a preexisting product that provides just opengraph metadata support.
Any comments are welcomed, of course!