CMS Development

SMustaque
Participant

Custom Schema in Blog posts

SOLVE

I am trying to add a dynamic Schema in blog posts but I have an issue with the code. I am using {{ content.name }} for getting the blog post name but in the result, it is coming with containing a span, So the schema checker shows an error.
I am attaching my code here, what code I'm using and what is the result I got.
If someone can help me out of this it will be an appreciable moment.
Thanks in Advance.Code-Screenshot.pngResult-Code.png

0 Upvotes
1 Accepted solution
paradummy
Solution
Contributor | Partner
Contributor | Partner

Custom Schema in Blog posts

SOLVE

Hi @SMustaque 
You can use the "striptags" filter to remove the surrounding html code: 

{{ content.name|striptags }}

 

View solution in original post

2 Replies 2
paradummy
Solution
Contributor | Partner
Contributor | Partner

Custom Schema in Blog posts

SOLVE

Hi @SMustaque 
You can use the "striptags" filter to remove the surrounding html code: 

{{ content.name|striptags }}

 

SMustaque
Participant

Custom Schema in Blog posts

SOLVE

Hi @paradummy 
The code works, Thanks for your help.

0 Upvotes