Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultMetaImage: add text field for custom URL #213

Open
florianschieder opened this issue Sep 2, 2024 · 0 comments
Open

DefaultMetaImage: add text field for custom URL #213

florianschieder opened this issue Sep 2, 2024 · 0 comments

Comments

@florianschieder
Copy link

Description

Add a field url to the DefaultMetaImage which is mutually exclusive to the filer field image.

Use cases

We use DjangoCMS for building web shops. There is a logic which can derive the main product preview from the visited page. If the page is not a product page, our shop logo is considered as fallback. The derived image (main product preview or shop logo) is served as og:image meta tag.

This is currently implemented and Django template tags in our own codebase but is not compatible with the "Default meta image" menu item our content team can (accidentally mis)use: If meta images are set at page level and if there is a default share image, our logic cannot properly distinguish through Meta.image if it's set at page or global level. This leads to unintended behaviour about what is written into the og:image meta tag.

Proposed solution

We would very much appreciate a new field url to DefaultMetaImage which is mutually exclusive to the image filer field. It would be helpful if this is just a plain text field, as we could let our content team insert a placeholder, e.g. {{ default_share_image }}. Our logic scrapes the rendered HTML payload and replaces this placeholder with either the product preview or shop logo URL. This would allow us to fulfill our use cases while having a solution fully compatible with djangocms-page-meta.

Alternatives

We've implemented our own fallback solution. This led to conflicts and misunderstanding to implement this compatible with the current og:image default image logic djangocms-page-meta implements.

Please let me know if there are any questions or further explanations required. Thank you very much in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy