Search the Community
Showing results for tags 'json-ld'.
-
Hi, through this site I generated a json-LD code for page definition from SEO point of view. They say that this language is the last frontier and better than RDF language. So I would like to understand how to integrate it with processwire. Integrating html meta tags with php language in processwire is easy and painless. I didn't understand if I can do the same thing with a json language. So the suggested scheme is this: <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "headline": "", "image": "", "author": { "@type": "", "name": "" }, "publisher": { "@type": "Organization", "name": "", "logo": { "@type": "ImageObject", "url": "" } }, "datePublished": "" } </script> Through the wireinclude function the template could link to a .php file with this .json code in it, however with processwire/php strings in it. In this way: <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "headline": "<?=$page->title?>", "image": "", "author": { "@type": "", "name": "<?=$page->name_author?>" }, "publisher": { "@type": "Organization", "name": "<?=$page->name_site?>", "logo": { "@type": "ImageObject", "url": "" } }, "datePublished": "<?=$page->date_article?>" } </script> Can it be done or is it a mess? ?