Optimize your website for search engines with Yoast SEO for TYPO3. This
extension integrates the text analysis and rating of Yoast SEO
into the TYPO3 CMS interface. The content analysis can generate interesting
metrics about a text and give you a score that can be used to improve the text
and help editors write high quality content.
This extension brings the content analyzer tools from YoastSEO to the interface of TYPO3 CMS. This Content analysis can
generate interesting metrics about a text and give you an assessment which can be used to improve the text. Besides that
you can set a focus keyword for every page. The content analyzer takes this into account and lets you know if your copy
uses it properly.
Every page includes a snippet preview which shows you how that page will show up in the search results. The title of the
page and description displayed along can easily be modified in the editor.
For your most important pages there is the option of marking this as "Cornerstone" content. This will have impact on how
the content analysis analyzes your page.
The "Overview" module gives you an overview of all the pages which are marked as "Cornerstone". This module also provides
a list of pages without a meta description so you can easily see the pages you have to improve.
Furthermore it brings a basic implementation of structured data (schema.org). By default it renders the needed JSON for
the schema.org types "BreadcrumbList" and "WebSite".
The latest release for Yoast SEO For TYPO3 brings these features:
Add synonyms for your focus keyword
Add related keyphrases with their own synonyms and analysis results
Get internal linking suggestions within your content elements so you're sure that your content is properly linked together
Get insights of your page so you know what the prominent words on your page are
Set advanced robot instructions for "Image index", "Archive" and "Snippet"
Find "Orphaned content", pages which have no internal links to them (within the Overview module)
Add widgets to your Dashboard: Pages without meta description, Orphaned content
Create a pull request with your bug fixes or new features.
Improve this documentation via the "Edit on GitHub" workflow.
Please read the guidelines
on how to contribute to this repository and how to report bugs, and take a look
at the "Development" page for setting up a local development environment.
Installation guide
Install the extension using your preferred method, TypoScript include is handled
automatically.
Head over to your CLI and run the following command
composer require yoast-seo-for-typo3/yoast_seo
Copied!
Not using composer? Download the zip file from the
TER and upload it through
the Extension Manager.
After installing it's necessary to flush the system caches and run the
Database Analyzer within the Install Tool.
Configuration guide
Yoast SEO works out of the box and does not require initial configuration.
However, a few things can still be configured using an extension that overwrites the EXTCONF of yoast_seo or by TypoScript.
Through the "Access lists" of backend users and groups it's possible to configure access for:
All the Yoast SEO fields within pages
The backend modules
The Dashboard widgets
Snippet Preview
Enable snippet preview on specific page types
By default, the snippet preview is only shown on pages with doktype 1 (Standard page) and 6 (Backend user section). You can
add your own doktypes like the example below by adding a doktype to the $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['yoast_seo']['allowedDoktypes']
array in the ext_localconf.php of your own extension.
The key can be any unique string. It is only used to identify the doktype as a developer. The value contains the numeric
value of the doktype.
Disable snippet preview with PageTs
Sometimes only a check on doktype isn't enough for disabling the snippet preview. For example if you want to hide the
snippet preview on detail pages of for example a news item, you need more than a check on a doktype. That is why you can
also disable the snippet preview based on PageTs. Below is an example of how to how the snippet preview if the page is a subpage of page with id 4.
[4 in tree.rootLineParentIds]
mod.web_SeoPlugin {
disableSnippetPreview = 1
}
[global]
Copied!
Basic auth configuration
For environments which are protected by Basic auth, it's possible to set username and password through $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['yoast_seo']['previewSettings']['basicAuth']
This provider does not have any configurable options.
Disabling provider(s)
If you want to disable a certain provider, you can do this by unsetting the provider key through typoscript. Example:
config.structuredData.providers.breadcrumb >
Copied!
Custom provider
It is possible to register a custom provider. For this, it's necessary to create a class which implements the
StructuredDataProviderInterface and provides a method getData which returns a multidimensional array. An example:
If you want to order the rendering of the providers, you can make use of the before and after settings.
If, for example, you want your custom provider to be rendered before breadcrumb and after site:
config.structuredData.providers {
custom {
provider = Vendor\Package\StructuredData\CustomStructuredDataProvider
before = breadcrumb
after = site
}
}
Copied!
Typoscript provider
It is possible to configure structured data through typoscript.
This is done through the config.structuredData.data object. The type and context keys do not need a @ and stdWrap is available on all keys.
An example for this configuration:
config.structuredData.data {
10 {
context = https://schema.org
type = Person
name = TEXT
name.data = field:author
email = TEXT
email.data = field:author_email
}
}
Copied!
Other Plugins
By default the SEO analysis is only done on pages.
If you want more type of records to use the SEO functions, these are two ways
of accomplishing this:
One important thing to know is that the snippet preview of records other than
pages, only works when you have set a proper preview link. This is needed for
both of the solutions above. The only thing you need to do is set some
PageTsconfig. More information about the configuration of the preview links
can be found in the documentation.
An example configuration of the preview links for EXT:news records is:
By using the automatic functionality the following will be added to your
records:
Backend:
Fields of the core SEO extension:
SEO title
Robots: Index this page, Follow this page
Opengraph fields: Title, Description, Image
Twitter fields: Title, Description, Image, Card
Canonical link
Sitemap: Change frequency, Priority
Functionality of Yoast SEO:
Snippet preview
Title and Description progress bar
Readability Analysis
SEO Analysis
Focus keyword
Advanced robots: Image index, Archive, Snippet
Frontend:
Metatag tags:
Description
Opengraph
Twitter
Robots
Canonical generation
Page title based on SEO Title and Title field
Configuration for a record
To get all the functionality mentioned above you only have to set the table
name and the GET parameters on which it responds to. This should be placed
in a file within Configuration/TCA/Overrides of your extension
(f.e. sitepackage):
This will automatically set the TCA, Database fields and activate the frontend
functionality.
Configuration options
The method configureRecord returns an object which has the following
methods:
setGetParameters
Datatype
array
Default
none
Description
The GET parameters on where the frontend functionality should be activated.
This should be a multidimensional array, which gives you the possibility to
react to multiple situations.
This will define if the default fields from EXT:seo should be added.
setYoastSeoFields
Datatype
boolean
Default
true
Description
This will define if the fields from Yoast SEO should be added.
setSitemapFields
Datatype
boolean
Default
true
Description
This will define if the fields "Change frequency" and "Priority" for Sitemap
should be added.
setTypes
Datatype
string
Default
empty (all types)
Description
Defines on which types of the record the fields should be added.
setTitleField
Datatype
string
Default
title
Description
Sets the title field to another column.
setDescriptionField
Datatype
string
Default
description
Description
Sets the description field to another column.
setAddDescriptionField
Datatype
boolean
Default
false
Description
Adds the description column to both TCA and database (in case there's none
already).
setFieldsPosition
Datatype
string
Default
after:title
Description
Sets the position of the TCA fields.
setOverrideTca
Datatype
array
Default
none
Description
Override TCA of the complete table. This can be useful if you want to change
something of the TCA of the EXT:seo or Yoast SEO fields. This is needed
because the automatic TCA generation is executed after all generated TCA, so
trying to add this to one of the Overrides files will not take effect.
This will enable/disable the functionality of the Page Title Provider
in the frontend.
setGenerateMetaTags
Datatype
boolean
Default
true
Description
This will enable/disable the rendering of the metatags in the frontend (in
case you want to this yourself). This will not deactivate the canonical tag.
setGenerateRobotsTag
Datatype
boolean
Default
true
Description
This will enable/disable the rendering of the robots metatag in the frontend
(in case you always want the robot settings from the page it's displayed on).
Example with EXT:news
EXT:news has his own sitemap fields and has multiple GET parameters to respond
to. The basic configuration can be:
EXT:news provides an own Page Title Provider, if you want to use the
Page Title Provider of Yoast SEO you can unset the one from EXT:news
with typoscript: config.pageTitleProviders.news >
Adding PageTsconfig
Make sure to add the needed PageTsconfig mentioned in Other Plugins
Manual configuration for records
How to integrate in other plugins
By default the SEO analysis is only done on pages.
If you want more type of records to use the SEO functions from Yoast SEO you
have to add some fields to the TCA.
In the example above, you see we define four fields for in this case the
EXT:news records.
The first field with renderType snippetPreview, is the field for the snippet
preview. In the settings section, you have to define which fields contains the
SEO title and the description. The snippet preview will use these fields to show
you your search result will look like. Make sure the fields that are set, do
exist. This field doesn't need a column in the database.
The second field doesn't need much configuration. Just add a field with
renderType readabilityAnalysis to have the readabilityAnalysis in your record.
This field also doesn't need a column in the database.
To have your content checked for SEO, you have to set a focus keyword, so we
need to add that field as well. This can be a simple text field. This is the
only field that needs a column in the database. Make sure you add this field to
the database table for your records. For the news table this would be the
following within the ext_tables.sql of your extension:
To show the focus keyword analysis, we need to add a field of renderType
focusKeywordAnalysis. In the settings section you have to define the field you
have created with the focus keyword. This field also doesn't need a column in
the database.
Adding PageTsconfig
Make sure to add the needed PageTsconfig mentioned in Other Plugins
Event
Event to change the URL to analyse
By default the extension is generating the URL to analyse based on the Site Configuration and configured Route Enhancers. In some cases
you want to change the URL that needs to be analysed. With the ModifyPreviewUrlEvent, you will be able to alter the URL that will be
used to analyse your content.
First you need to create an EventListener that will :
<?phpnamespaceVendor\Package\EventListener;
useYoastSeoForTypo3\YoastSeo\Event\ModifyPreviewUrlEvent;
finalclassModifyPreviewUrlEventListener{
publicfunction__invoke(ModifyPreviewUrlEvent $event){
$url = $event->getUrl();
$site = $event->getSite();
$pageId = $event->getPageId();
$languageId = $event->getLanguageId();
// Create a new url based on your needs
$event->setUrl($newUrl);
}
}
Copied!
After you created your event listener to alter the URL, you need to register it in your Services.yaml.
Check the TYPO3 documentation for your used TYPO3 version on how to register this correctly.
After you have registered the listener, you need to clear the TYPO3 cache through the Maintenance module
(or vendor/bin/typo3 cache:flush) before your code will be activated.
Editor's guide
Find out all about how to use Yoast SEO as an editor!
By default it is rendered within the page module above your content:
|img-snippetpreview-page|
You can also find the snippet preview within the SEO tab of the page properties:
|img-snippetpreview-properties|
What information is used for the snippet preview?
Title
The title is being generated based on your page title (General tab), overridden by the "Title for search engines" (SEO tab).
Based on your frontend configuration the website title gets prepended or appended.
Description
This uses the content from the "Description" field under the SEO tab.
A default placeholder is shown when there is no description available.
Favicon and URL
The favicon and url are generated from the frontend information.
If there's no favicon available (shortcut icon) the default favicon.ico from the root is rendered.
Can I disable the snippet preview?
There are two ways to disable the snippet preview within the page module:
On a specific page
If you want to disable the snippet preview for a specific page, you can set the property
"Hide Yoast SEO snippet preview in page module for this page" under the "Social media" tab:
|img-snippetpreview-hide-page|
Disabling globally
If you want to globally disable the rendering of the snippet preview within the page module,
you can set this within your user settings:
|img-snippetpreview-hide-global|
Content Analysis
Where can I find the analysis?
Within the page module
On top of the page module you will find the "Readability" and "SEO" analysis:
|img-analysis-page|
You can click on a particular analysis to see more information about problems, improvements and which tests have passed:
|img-analysis-readability|
|img-analysis-seo|
Within the page properties
Within the page properties the analyses are not clickable, but the results are shown at the appropriate place.
Both results are shown under the SEO tab.
The Readability analysis can be beneath the Description field
The SEO analysis can be found beneath the Focus keyphrase field.
Insights
Within the SEO tab you'll find the "Insights" information.
This is a list of the most prominent words on your page.
An example of a prominent words list:
|img-insights|
Focus keyphrases
It is very import to set the correct focus keyphrase(s) for your page, this can be done within the page properties.
Focus keyphrase
Within this field you set the main focus of the page, for example "bike".
The value of this field will be taken into account with the content analysis,
to make sure your content matches what you want to focus on.
Synonyms
You have the possibility to add synonyms for your focus keyphrase.
Using synonyms is a way to help users understand your copy better and search engines will recognize these synonyms too.
This can be a comma separated list of synonyms.
For example: "bicycle, cycle, ride, two-wheeler".
Related keyphrases
You have the possibility to add (maximum 5) related keyphrases.
These come with their own analysis and their own synonyms possibility:
|img-focus-related|
Overview module
Yoast SEO ships with an extra backend module "Overview".
This module contains multiple views where you can see certain pages in one single overview.
For every page you can immediately see the Readability and SEO analysis.
Cornerstone content
This shows a list of all the pages marked as "Cornerstone content" within your installation.
Pages without meta description
All pages without a meta description will be listed here.
It is important to keep this list as small as possible.
In this repository we added a DDEV setup so you can easily test your
contributions in all the TYPO3 versions the extension should work with.
First of all, make sure you have installed DDEV and Docker. See the
DDEV documentation
how to do that. After you have installed DDEV, run the following command in the
root of this repository.
ddev start
Copied!
After the setup is started, you can use the following command to make sure all
installations are up and running.
ddev install-all
Copied!
When the script is finished, you can go to https://yoast-seo.ddev.site and check
the TYPO3 installations that are available to test your work.
Instances
The following instances will be up and running for you after you have installed
the DDEV setup.