Skip to content

Commit

Permalink
Added SEO field explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
krazzer committed Oct 1, 2023
1 parent 0eb540f commit 4f62362
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
13 changes: 13 additions & 0 deletions resources/translations/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@
'pages' => [
'total' => 'Total',
'amountPerPage' => 'Amount of items per page',

'seo' => [
'title' => 'SEO title',
'keywords' => 'SEO keywords',
'description' => 'SEO description',
'titleHelp' => 'The SEO title is the name of the page as you would like it to appear in ' .
'search engines (if different from the regular title)',
'keywordsHelp' => 'Keywords are the words (comma separated) where you want the ' .
'page to be found with in search engines.',
'descriptionHelp' => 'The description is the description you want to show of the page in the ' .
'search engine. If you leave this empty, the search engine will do this itself using the contents '.
'of the page',
]
],

'delete' => [
Expand Down
13 changes: 13 additions & 0 deletions resources/translations/nl.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@
'pages' => [
'total' => 'Totaal',
'amountPerPage' => 'Aantal items per pagina',

'seo' => [
'title' => 'SEO titel',
'keywords' => 'SEO sleutelwoorden',
'description' => 'SEO omschrijving',
'titleHelp' => 'De SEO titel is de naam van de pagina zoals je hem zou willen weergeven in ' .
'zoekmachines (indien afwijkend van de reguliere titel)',
'keywordsHelp' => 'Sleutelwoorden zijn de woorden (kommagescheiden) waarop je wilt dat de ' .
'pagina gevonden moet worden in zoekmachines.',
'descriptionHelp' => 'De omschrijving is de omschrijving die je wilt tonen van de pagina in de ' .
'zoekmachine. Als je dit leeg laat zal de zoekmachine dit zelf a.d.h.v. van de inhoud van de ' .
'pagina',
]
],

'delete' => [
Expand Down
9 changes: 6 additions & 3 deletions src/Forms/PageForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,12 @@ protected function initialize()
}

$tabSeoFields = [
$this->addTextField('pageLanguage*:seo_title', 'SEO titel'),
$this->addTextAreaField('pageLanguage*:seo_keywords', 'SEO sleutelwoorden')->rows(4),
$this->addTextAreaField('pageLanguage*:seo_description', 'SEO omschrijving')->rows(12),
$this->addTextField('pageLanguage*:seo_title', $this->translator->tl('dataTable.pages.seo.title'))
->setHelpText($this->translator->tl('dataTable.pages.seo.titleHelp')),
$this->addTextAreaField('pageLanguage*:seo_keywords', $this->translator->tl('dataTable.pages.seo.keywords'))
->rows(4)->setHelpText($this->translator->tl('dataTable.pages.seo.keywordsHelp')),
$this->addTextAreaField('pageLanguage*:seo_description', $this->translator->tl('dataTable.pages.seo.description'))
->rows(12)->setHelpText($this->translator->tl('dataTable.pages.seo.descriptionHelp')),
];

$this->addTab('SEO', $tabSeoFields);
Expand Down

0 comments on commit 4f62362

Please sign in to comment.