Anyone give me a hand? Please?
|
1 posts
|
Hey Guys, I’m new to this forum and am also relatively new to PHP and mySQL Development, i have dabbled in the past with it. I am currently trying to use Frog CMS to provide a new method of getting my designs out there in an easy manor for my clients that allows them to update the site content on their own. I am trying to make a template that will handle itself and the creation of sub-menus, however have hit a snag. The submenu will work using the following:
However once i get move from the first level pages to the second level (ie. /page/secondpage/) i get the following error: Fatal error: Call to a member function children() on a non-object in /home/ap/public_html/UniPress/frog/app/frontend/classes/Page.php(330) : eval()‘d code on line 8 Could any one give me a hand please? It would be greatly appreciated :D Cheers |
|
651 posts
|
The error message is due to the fact that your attempt to $this->find() some page didn’t work. Check if the find() action returned an actual object before trying to access its children() funtion. Mind you… you don’t actually need to find the page since $this already refers to the current page. You can also use childrenCount() to check the number of children a page has. i.e. try something like: |
|
1 posts
|
Brilliant, Thanks very much mate! |