Closed alexanderhacke closed 4 months ago
It looks like there's something before the find()
method you're calling and it's null
. Do you use $module->find('forms')
or $page->find('forms')
? Where is the forms page located?
Hi Thomas, ups, sorry.
Here is the full line i have in my modules template:
<?php echo kirbytextinline($pages->find('forms')->company()) ?>
The forms page is a unlisted site and located in the root.
When i place the line <?php echo kirbytextinline($pages->find('forms')->company()) ?>
outside the modules template, everything works fine.
I hope you can help :)
Ah, I see. Thanks for the full picture. Looks like the $pages
variable is null
. You can try $site->pages()
or site()->pages()
instead.
Juhuu, it works perfekt! Thank you so much :-)
Thanks for the great plugin!
I have a small problem and hope you can help me with it :)
In my module template I have the following request:
I get the following error message:
Call to a member function find() on null
Can you please tell me how I can access a page via a module?
Thanks a lot Alex