Hello,
I'd like to display in Footer:
A) content (or other fields) from a page with a given name (let's say I'd like to display contact information from the ContactPage named "Kontakt")
B) content (or other fields) from a first (or random) page of a given type (let's say I'd like to display content from random (or first) page of ProductPage type)
A
public function KontaktContent()
{
return $contactPage = ContactPage::get()->First(); // prefer to get a page by name because there can be more than one page of ContactPage type
// also want to get Content only, not a whole page
}
B
public function RandomProductPage()
{
return $randomProductPage = ProductPage::get()->Random(); // is it correct?
}
Thanks in advance, Sebastian