Add striptags to meta description by default #59
lexislav
started this conversation in
Feature Requests
Replies: 3 comments
|
@lexislav This can be done using the Element Metadata field Custom Format setting. I've considered adding it by default, or an option to have it in there by default but as the Rich Text fields are third party fields we probably couldn't be consistent about which ones we support. At the very least, I can add a better section in the docs for this common use case. When you choose Custom Format you can target your field and apply Twig filters just like Craft's Title Format field in Section settings. |
0 replies
|
I’am aware of possibility to set this in SEO field and that I am working with this for now
{{ perex|striptags }}
But Ii cann’t hand down the SEO configuration to editor as this is bit too „advanced“ – here the idea to make this default.
But got Your point.
Thanks
… 11. 11. 2020 v 14:55, Ben Parizek ***@***.***>:
@lexislav <https://github.com/lexislav> This can be done using the Element Metadata field Custom Format setting.
I've considered adding it by default, or an option to have it in there by default but as the Rich Text fields are third party fields we probably couldn't be consistent about which ones we support. At the very least, I can add a better section in the docs for this common use case.
When you choose Custom Format <https://sprout.barrelstrengthdesign.com/docs/seo/element-metadata-field.html#field-settings> you can target your field and apply Twig filters just like Craft's Title Format field in Section settings.
shorthand syntax:
{customFieldHandle|striptags}
or object syntax:
{{ object.customFieldHandle|striptags }}
or multiple filters:
{customFieldHandle|striptags|slice(0, 150)}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <https://github.com/barrelstrength/craft-sprout-seo/issues/230#issuecomment-725436378>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABWQ6VP2KG7ZABOWAXTKQSDSPKJUPANCNFSM4TPI5GYQ>.
|
0 replies
|
Ok, great. I'll update this to be an FR and see if we can consider a default option, at least for the common Craft Rich Text fields, in the future. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
When redactor (or similar) field is used to generate SEO description, it includes HTML tags.
Would it be possible to add |striptags to seo template by default – as it has no sense to keep html tags in meta description?
All reactions