Fetch / query content from another page

Okay… this must be the most basic question ever, but I’ve never dealt with it before…

Imagine this is my content-folder / site-setup;

/1-home
  home.txt
/2-about
  about.txt

How do I get a field-value (e.g. “intro” which contains a introduction-text) from home.txt on the about-page?

I tried several syntaxes, none of them did work…

echo $page->find('home')->intro()->kt();
echo $page('home')->intro()->kt;

It’s easy to parse the value from a field, directly linked to that page - but how do you fetch / query values from other pages?

Your second example works without the $-sign:

page('home')->intro()->kt();

Or

$pages->find('home')->intro()->kt();

http://getkirby.com/docs/cheatsheet/pages/find

1 Like

Wow, perfect!

I knew I had to query it with ‘find’, but forgot the difference between “$page” and “$pages” :smile:

Well, hopefully anyone else stumbling across this basic issue, will find the solution here!