Hey there,
my page model looks like this:
<?php
class CalendarPage extends Page {
public function children()
{
$children = [
[
'slug' => 'someslug',
'template' => 'default',
'model' => 'default',
'parent' => page('kalender'),
'translations' => [
'de' => [
'code' => 'de',
'content' => [
'title' => 'This is not a real page DE',
'date' => '2019-05-01',
'text' => 'The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didn’t listen.'
],
],
'en' => [
'code' => 'en',
'content' => [
'title' => 'This is not a real page EN',
'date' => '2019-05-01',
'text' => 'The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didn’t listen.',
],
],
'fr' => [
'code' => 'fr',
'content' => [
'title' => 'This is not a real page FR',
'date' => '2019-05-01',
'text' => 'The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didn’t listen.'
],
],
],
],
];
return parent::children()->add(Pages::factory($children, $this));
}
}
As you can see, I want to establish a virtual page alongside my existing pages inside children()
which works so far - BUT how can I change their language handles / slugs? Normally, I’d define handle
, but adding it to my example above doesn’t work - I can visit only somepage/someslug
and en/somepage/someslug
, not en/somepage/some-other-slug
.
Thanks for suggestions!
S1SYPHOS