Hi All
I'm new to process wire and haven't touched php in about 8 years, however, from the lack of questions on the subject, I'm assuming this is not a common issue and more than likely my own doing.
I am using the default site template t get to know the product and have added a simple function to the _func.php code file. I am further, using the default pages:
Now I have added the simple function:
function getHomePageName() {
$homepageName = '';
if($pages){
$homepage = $pages->get('/');
$homepageName = $homepage->name;
}
else
$homepageName = 'Nothing found';
return $homepageName;
}
The $pages object always null and the code
Any help in determining why the the $pages object is null would be appreciated
Thanks
Dave N