Path to the first child page?
PermalinkI don't want to redirect the page, I just need the path to link an image of a custom block ( in view.php) to the first child page. If no child page exists, nothing should be output.
In other words: clicking on an image in a custom block should lead to the first child page.
How could that be done?

The custom block should get it by itself.
To be more precise: I have built a custom image block. The image displayed by this block should be linked to the first subpage of the page where the block is inserted.
The snippet I'm looking for would have to recognize the current page ID, the page ID of the first subpage and finally the path to the first subpage.
https://www.webli.us/cheatsheet/doku.php...
$page = Page::getCurrentPage(); $pageID = $page->getCollectionID();
Then instead of adding 21 above, you can add $pageID
That code works fine, except if the block is placed on the start page (since then there is no parent page).
Could there be a solution?