Good evening,
I try to explain my problem in english language which is very difficult for me.
I use kirby instead of typo3 for a relaunch of a portal and to be hones it is sometimes quite frustrating.
I set up the so called blog as discribed on https://getkirby.com/docs/cookbook/blog
I use the blog system for me news section of the portal.
home
– verteilerseite
– – unterseite
– – unterseite
– blog
– – artikel 1
– – artikel 2
Now I want to show the three newest headlines with a link to the article on the home site.
This is an important key feature I really need to realize. Has anyone please an idea please?
Cheers from Berlin, Daniel
Sure, you can reference any page by it’s URI using the page helper, so on the home page, you can get the children of blog like this. This will sort the visible children (i.e. those with a prepended number) by date in descending order, and fetch 3 of them:
<?php
$articles = page('blog')->children()->visible()->sortBy('date', 'desc')->limit(3);
?>
I am assuming that your articles have a date field…
Many thanks for your fast reply and your kindly help.
No I have no date field because that does not work. But I have set up a normal text fielt with the name “date” in the blueprint.
I am not sure if I were able to diecribe my problem in english and will try it once again. I bag your pardon.
The blog is not the home page (starting page/ index.php). It is a sub page with the articles as children.
Exept of the 'RSS plugin that works fine.
But I need the headline of the last three articles with links to the corresponding URL on my home site (index.php).
:-/
You mean your blog page is a child of home?
And why does the date field not work? Because of that output problem you describe in the other thread? That should work now if you use the code I posted there.
In that case, you would get it like this:
<?php
$articles = page('home/blog')->children()->visible()->sortBy('date', 'desc')->limit(3);
// alternatively
$articles = $page->children()->find('blog')->children()->visible()->sortBy('date', 'desc')->limit(3);
foreach($articles as $article): ?>
<h2><?= $article->title() ?></h2>
<?php endforeach ?>
I tired both. The first solution rutorned just nothing. The second code made errors and the website went offline. So both does not work.
I am not sure what exactely a child is. the structure is like that:
home (index?)
– verteilerseite
– -- sub page
– -- sub page
– blog
– -- blogarticle
– -- blogarticle
– verteilerseite
– -- sub page
– -- sub page
etc…
The setup is exactely like https://getkirby.com/docs/cookbook/blog
But: blog is not the start page/home page / Startseite but blug is a Verteilerseite. That means unter the home site.
I need the three lastest articles headlines WITH a link to the specific site like I did it on the site “blog” but I have to do that on home.
Well, first of all, check if your blog subpages are visible as I said above, otherwise it will indeed return nothing.
Secondly, if your field is not called date, but datum, you need to change that. I removed the “visible” bit below:
To check if this returns anything, do a dump
$articles = $page->children()->find('blog')->children()->sortBy('datum', 'desc')->limit(3);
dump($articles);
Yes blog and blogarticles are visible.
I deployed now on stage and deleted the password for the next ten minutes to show you what i mean 
There is the so called blog on http://stage.fading.de/blog
I integrated your code on the home site. In debug mode you see the following error: http://stage.fading.de/
Ok now that works fine:
<?php
$articles = page('blog')->children()->visible()->sortBy('date', 'desc')->limit(3);foreach($articles as $article): ?><h2><?= $article->title() ?></h2>
<?php endforeach ?>
Yeaaa !!
Now I only ned to create a link to the article. Is this possible?
Of course:
<?php
$articles = page('blog')->children()->visible()->sortBy('date', 'desc')->limit(3);foreach($articles as $article): ?>
<a href="<?= $article->url() ?>"><?= $article->title() ?></a>
<?php endforeach ?>
BTW: You can use three leading and trailing backticks to make your code examples inside a forum post much more readable. 

… will result in …
<!-- Place your code here -->