Skip to content

Commit

Permalink
Get the URL suffix from the base URL
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Dec 13, 2019
1 parent 5cd116f commit 584e0e8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core-bundle/src/Resources/contao/widgets/SerpPreview.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function generate()

// Get the URL with a %s placeholder for the alias or ID
$url = $this->getUrl($model);
list($baseUrl) = explode('%s', $url);
list($baseUrl, $urlSuffix) = explode('%s', $url);
$url = sprintf($url, $model->alias ?: $model->id);

// Get the input field suffix (edit multiple mode)
Expand All @@ -51,7 +51,6 @@ public function generate()
$aliasField = $this->getAliasField($suffix);
$descriptionField = $this->getDescriptionField($suffix);
$descriptionFallbackField = $this->getDescriptionFallbackField($suffix);
$urlSuffix = System::getContainer()->getParameter('contao.url_suffix');

return <<<EOT
<div class="serp-preview">
Expand Down

0 comments on commit 584e0e8

Please sign in to comment.