$pages->find and give title() and text()

Hey !

Sorry for my bad english. :smile:

I try to insert the “title” and “text” from an other site on my website to the active site, but is not working :sleepy:

 <?php echo $pages->find('3-praxisspektrum')->title()?>
 <?php echo $pages->find('3-praxisspektrum')->text()->kirbytext()?>

praxisspektrum is an visible site ! The active (open) website is not visible- maybe this is the problem ?

Have you an Idea ?

Try it without the 3: $page->find('praxisspektrum')->title() or page('praxisspektrum')->title().

For that praxisspektrum should be a top-level page, otherwise do page('parent/praxisspektrum')...

your idea was not working, sry.

<?php echo $pages->nth(2)->url() ?> <?php echo $pages->nth(2)->title()->html()?>

This works :):))

You sure your page is actually called anything like praxisspektrum?
Cause the page() helper should work pretty reliable: http://getkirby.com/docs/cheatsheet/helpers/page

Using nth() shouldn’t be the solution you settle for - not that it’s not working for the moment, but just cause it’s not actually the logic of what you want to do.