gregory Posted May 27, 2021 Share Posted May 27, 2021 Hi guys, in my _head.php template when I add the PHP code to display the menu I get an error. #0 wire/core/TemplateFile.php (304): require() #1 wire/core/Wire.php (394): TemplateFile->___render() #2 wire/core/WireHooks.php (823): Wire->_callMethod('___render', Array) #3 wire/core/Wire.php (465): WireHooks->runHooks(Object(TemplateFile), 'render', Array) #4 wire/modules/PageRender.module (536): Wire->__call('render', Array) #5 wire/core/Wire.php (397): PageRender->___renderPage(Object(HookEvent)) #6 wire/core/WireHooks.php (823): Wire->_callMethod('___renderPage', Array) #7 wire/core/Wire.php (465): WireHooks->runHooks(Object(P (line 7 of site/templates/_head.php) This error message was shown because: site is in debug mode. ($config->debug = true; => site/config.php). Error has been logged. This is the code for render menu: foreach($home->and($home->children) as $item) { $class = $item->id == $page->rootParent->id ? 'uk-active' : ''; echo "<li class='$class'><a href='$item->url'>$item->title</a></li>"; } How can I solve? Thanks Link to comment Share on other sites More sharing options...
wbmnfktr Posted May 27, 2021 Share Posted May 27, 2021 Just a guess but maybe $home isn't defined. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now