An extension providing a mechanism to populate meta description header from content fields when MetaDescription is empty
This module applies a data extension to SiteTree providing a mechanism to populate meta description header from a defined
set of content fields when the default MetaDescription is empty.
The list can use names of fields, names of methods or leverage the the dot notation to reference relations or methods,
as outlined in the configuration example below.
The extension this module provides can also be applied to dataobjects, for example if you are outputting them as pages
and need meta tags included in the source of the page.
In this case the MetadataTagsTrait also needs to be used by those dataobjects.
composer require "chrometoaster/silverstripe-metadescription-fallback"
In your config.yml
, define the list of fields:
Chrometoaster\SEO\DataExtensions\MetaDescriptionFallbackExtension:
fallback_fields:
- Description
- Introduction
- Content.Summary
- RelatedPages.First.MetaDescription
Run dev/build either via opening the url http://<your-host>/dev/build
in a browser or
by running the dev/build task using CLI.
Please create an issue for any bugs you've found,
or features you're missing.
For details of updates, bugfixes, and features, please see the changelog.
Module rating system helping users find modules that are well supported. For more on how the rating system works visit Module standards
Score not correct? Let us know there is a problem