Skip to content

Commit 393b007

Browse files
authored
Fixes page url not beeing translated
1 parent 5b3014d commit 393b007

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

behaviors/TranslatablePageUrl.php

+3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ protected function setModelUrl($value)
6161
{
6262
if ($this->model instanceof \Winter\Pages\Classes\Page) {
6363
array_set($this->model->attributes, 'viewBag.url', $value);
64+
65+
// 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
66+
$this->model->getViewBag()->setProperty('url', $value);
6467
}
6568
else {
6669
$this->model->url = $value;

0 commit comments

Comments
 (0)