Skip to content

Commit

Permalink
Fixes page url not beeing translated
Browse files Browse the repository at this point in the history
  • Loading branch information
der-On authored Dec 16, 2024
1 parent 5b3014d commit 393b007
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions behaviors/TranslatablePageUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ protected function setModelUrl($value)
{
if ($this->model instanceof \Winter\Pages\Classes\Page) {
array_set($this->model->attributes, 'viewBag.url', $value);

// the url must also be set using the viewBag itself as setting it in the attributes array will actually not change it in the viewBag
$this->model->getViewBag()->setProperty('url', $value);
}
else {
$this->model->url = $value;
Expand Down

0 comments on commit 393b007

Please sign in to comment.