JSON LD Schemas

JSON-LD Schemas

MokoSuiteOpenGraph emits schema.org structured data as JSON-LD <script type="application/ld+json"> blocks for Google rich results and other consumers. Enable it with Enable JSON-LD in the plugin's Advanced settings.

All output is encoded with json_encode and </ is escaped to <\/ to prevent </script> breakout (XSS-safe). Values pulled from content are never concatenated as raw strings.

Automatic schemas

Schema When it's emitted Source
Article com_content article pages Title, intro/full text, image, author, publish/modified dates
Product com_mokoshop product pages Name, description, image, SKU, offers (price/currency/availability), aggregateRating
WebPage All pages Page name, description, URL
BreadcrumbList All pages (optional) Joomla pathway — toggle with JSON-LD Breadcrumbs
Organization Site-wide Site name and URL
LocalBusiness Site-wide (optional) The LocalBusiness fields in plugin config

Auto-detected schemas

Schema Trigger Setting
FAQPage Question/answer pairs detected from article h3/h4 headings FAQ JSON-LD
HowTo Steps detected from ordered (<ol>) lists HowTo JSON-LD

Per-article schemas

Set in the article's MokoSuiteOpenGraph tab and stored in #__mokoog_tags:

Schema Field Notes
Event event_data Dates, venue, ticket/offer info
Recipe recipe_data Prep/cook times, ingredients, nutrition
VideoObject og_video Built from the per-article video URL
Custom custom_schema Any schema.org type — paste a JSON object

The Event/Recipe/Custom fields must contain a JSON object (e.g. { "startDate": "…" }). Scalars (42, "x", true) are rejected on save, on CSV import, and ignored on render — they previously caused a fatal page error and are now guarded.

Custom schema example

Paste into the Custom JSON-LD field on an article:

{
  "@type": "SoftwareApplication",
  "name": "MokoSuiteOpenGraph",
  "applicationCategory": "Joomla Extension",
  "operatingSystem": "Joomla 6+",
  "offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" }
}

@context is added automatically if you omit it. The result is emitted as a standalone JSON-LD block on that page.

Validating output

Use Google's Rich Results Test or the Schema Markup Validator. The tag manager's per-row G debug link opens the Rich Results test pre-filled for that content item.


Printed from wiki · JSON LD Schemas