Hi,
I try to convert a K2 blog to K3. But I have now problems to convert my post-type templates to k3.
At the blog-viewing I load snippets for every post-type, this works as expected.
But if I click on a blogarticle I get the error page and not the blogarticle.
In the snippet I have created the link to the Article like:
<h3><a href="<?php echo $article->url() ?>"><?php echo $article->title()->html() ?></a></h3>`` the article var is forwarded from the snippet call. Normally the Link to the blogarticle should be
de/blog/test-blogbut with
url()I get only the
/test-blogand this results in the error page. If I use
uri()than I miss the
/de/`in the URL.
it worked perfectly in my old blog. Has something changed in K3 what i have missed?
Here is also the dump from $article
inside the snippet.
Kirby\Cms\Page Object
(
[children] => Kirby\Cms\Pages Object
(
)
[content] => Kirby\Cms\Content Object
(
[title] => test blog
[subheadline] => untertitel
[date] => 2019-03-14
[tags] => test, html
[text] => saasdasasdasdasdasd
)
[files] => Kirby\Cms\Files Object
(
)
[id] => blog/test-blog
[mediaUrl] => xxx/xxx/media/pages/blog/test-blog
[mediaRoot] => /var/www/virtual/xxx/html/xxx/media/pages/blog/test-blog
[num] => 1
[parent] => blog
[slug] => test-blog
[template] => Kirby\Cms\Template Object
(
[name:protected] => test-blog
[type:protected] => html
[defaultType:protected] => html
)
[translations] => Kirby\Cms\Collection Object
(
[0] => de
)
[uid] => test-blog
[uri] => blog/test-blog
[url] => xxx/xxx/de/test-blog
[siblings] => Kirby\Cms\Pages Object
(
[0] => blog/test-blog
[1] => blog/test-blogpage
[2] => blog/default-post
)
)