Forums / Developer / 9 SQL queries with empty pagelayout.tpl - eZ 3.9.2
Radek Kuchta
Monday 11 June 2007 8:26:26 am
Hi All,
As we know an optimized pagelayout template should generate only two or three SQL queries with viewcache enabled. I've tested empty pagelayout.tpl (below) and my result is 9 sql queries (Looping result = 8).
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$site.http_equiv.Content-language|wash}" lang="{$site.http_equiv.Content-language|wash}"> <head> <title>Test</title> </head> <body> {*$module_result.content*} </body> </html> <!--DEBUG_REPORT-->
My question is - what is the reason for this situation?
http://ez.no/certification/verify/272582
André R.
Monday 11 June 2007 8:33:41 am
$module_result.content is generated before pagelayout is generated. Meaning even if you comment it out it's still generated.
So this depends on what code you have in the content template for the uri you're testing against, and if the uri is a content/view/ page, viewcache needs to be enabled.
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription @: http://twitter.com/andrerom
Monday 11 June 2007 8:51:32 am
Hi André,
When I'm calling the content/view/my_node_id with my_template.tpl I have always 9 queries (after view cache is generated).My tpl (for full view) code:
<h1>{$node.name|wash()}</h1> [ContentSettings] ViewCaching=enabled
--I've found the reason (strange for me). It was an ini setting:
[RoleSettings] EnableCaching=enabled
one way or the other, thanks