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

[Admin][Documents] Refactor Meta property settings #12399

Closed
dvesh3 opened this issue Jun 13, 2022 · 9 comments
Closed

[Admin][Documents] Refactor Meta property settings #12399

dvesh3 opened this issue Jun 13, 2022 · 9 comments

Comments

@dvesh3
Copy link
Contributor

dvesh3 commented Jun 13, 2022

When using documents, we always need to add a property og-image for the client to set the og-image. This results in the following code for every project:

{% if document.property('og-image') %}
    {% do pimcore_head_meta().setProperty('og:image', host_url() ~ document.property('og-image').thumbnail('og-image').path) %}
{% endif %}

However, working with properties is quite cumbersome for almost every client. Especially, since there is no preview of the asset. Additionally, most clients try to find the setting in the SEO & Settings tab.

So, I propose adding an image field to the SEO & Settings tab, which can then be used for Open Graph. WDYT?

Note that the field should be called image (as opposed to ogImage), so it can be used in various contexts. For example, the same field could be used for teasers in a blog or in search results - as these teasers should use the same preview image anyway.

Originally posted by @passioneight in #12367

@dvesh3 dvesh3 changed the title When using documents, we always need to add a property og-image for the client to set the og-image. This results in the following code for every project: [Admin][Documents] Refactor Meta property settings Jun 13, 2022
@dvesh3
Copy link
Contributor Author

dvesh3 commented Jun 13, 2022

please see the suggested approach #12367 (reply in thread)

@aarongerig
Copy link
Contributor

Just as an FYI: There is this bundle, which already provides the Pimcore user with such functionality. Maybe that's something to consider before creating the PR. 🙂

@passioneight
Copy link
Contributor

@aarongerig thanks! While the bundle looks promising, the documentation states that support is only available for 10.1-10.2. Additionally, it seems unmaintained for almost half a year. Maybe @dpfaffenbauer has more information on this?

@dpfaffenbauer
Copy link
Contributor

@passioneight not my bundle, but it works with Pimcore 10.4 too. Great extension for Pimcore.

@passioneight
Copy link
Contributor

@dpfaffenbauer I know, I just figured you may have some information, because your are seemingly part of every Pimcore-related code :-D

Anyway, thanks for the info - glad to hear everything's still working in 10.4. I wonder though, if this bundle should be at least added to the suggest part of the composer.json. Any thoughts?

@aarongerig
Copy link
Contributor

I would not suggest adding this bundle to the suggest section of Pimcore's composer.json as there are many great bundles out there, which would then belong onto this list as well. So the list of suggestions would quickly become confusing/messy.

Star it, bookmark it and tell others instead! 😉

@dpfaffenbauer
Copy link
Contributor

@passioneight
Copy link
Contributor

@aarongerig fair point.
@dvesh3 I guess, we can close this issue.

Thanks to everyone for sharing your feedback!

@solverat
Copy link
Contributor

Just for the record: The SEO Bundle works with Pimcore 10.5 and will also support upcoming PIMCORE Versions like 11.0.

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

5 participants