Hey there, I upgraded my site to Kirby 3 and noticed that my
<title> isn’t working correctly. It displays the page title, but the site title is being left out.
My code looks like this:
<title><?php echo $page->title()->html() ?> | <?php echo $site->title()->html() ?></title>
Project A | My Site
Project A |
Can anyone help?
Thanks in advance!
After upgrade, do you set title from panel dashboard under the topbar? Maybe you should save it after upgrade.
What is saved in your
Are you using the Panel? If so, have you updated your
Thanks for your reply!
The structure of my
site.txt looks like this:
Copyright: © (date: Year)
I am using the panel. As far as I can tell, the
site.yml has been updated. It now looks like this:
Thanks for the reply. I don’t know if I understand you correctly, but the title is saved in the equivalent
So there is actually something stored in your
site.txt, just wanted to make sure, because if you have a title field in your site.yml, the title text might have been deleted.
Is other content from
site.txt rendered correctly, like the copyright information etc.?
I am afraid I cannot really tell whether the other content is being rendered because the title is the only information that is used (explicitly) within the site.
You could test and try and render anything in any template or snippet, e.g.
<?= $site->copyright() ?>
Thank you. It seems like the content is not being rendered. If I place
<p><?= $site->copyright() ?></p> in a template, the only leftovers in the frontend are the empty
Seems that the file is not readable? Have you checked the file permissions?
Maybe delete the file and create a new one via the Panel. A new site.txt is created if you edit the site title in the Panel (via the edit icon that appears if you hover your mouse over the part above the open button)
It worked! I created a new
.txt file via the panel and now, all titles are displayed correctly. Thank you very much for your quick and constructive help, Dankeschön!