erik
June 4, 2015, 10:36am
1
Hey !
Sorry for my bad english.
I try to insert the “title” and “text” from an other site on my website to the active site, but is not working
<?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')...
erik
June 4, 2015, 2:24pm
3
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.