Jump to content

Error render in TemplateFile


Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...