Forums / Setup & design / Problems with template and left menu

Problems with template and left menu

Author Message

Andreas Kaiser

Wednesday 25 October 2006 2:51:48 am

I'm creating my first ez template and have been reading the "tscm tutorial" and ez publish books. I have configured ez publish and had no problems. The templates are at design/newdesign/templates. In this folder I have created following templates:

menu_banners.tpl (static html)
menu_bottom.tpl (static html)
pagelayout.tpl (html with ez template code
topheader.tpl (static html)

I also use an extension for the left menu. This extension uses a left_menu.tpl template file.

When I load the site, my layout appears with no errors, except the menu doesn't loads. When I delete (or rename) the pagelayout.tpl file and use the default pagelayout the menu appears with no errors.

Why this happens? The left_menu is loaded with the same lines than in the default ez pagelayout:

{* Left menu START *}
{include uri="design:left_menu.tpl"}
{* Left menu END *}

Here is my pagelayout code:

{*?template charset=latin1?*}
<!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>
{section name=JavaScript loop=ezini( 'JavaScriptSettings', 'JavaScriptList', 'design.ini' ) }
<script language="JavaScript" type="text/javascript" src={concat( 'javascript/',$:item )|ezdesign}></script>
{/section}
    <link rel="stylesheet" type="text/css" href={"stylesheets/alares.css"|ezdesign} />
    <link rel="stylesheet" type="text/css" href={"stylesheets/core.css"|ezdesign} />
    <link rel="stylesheet" type="text/css" href={"stylesheets/debug.css"|ezdesign} />
<style type="text/css">
{section var=css_file loop=ezini( 'StylesheetSettings', 'CSSFileList', 'design.ini' )}
    @import url({concat( 'stylesheets/',$css_file )|ezdesign});
{/section}
</style>

{include uri="design:page_head.tpl"}
{* moofx java*}
{literal}
	<script type="text/javascript">
	//the main function, call to the effect object
	function init(){
		var stretchers = document.getElementsByClassName('stretcher'); //div that stretches
		var toggles = document.getElementsByClassName('display'); //h3s where I click on
		//accordion effect
		var myAccordion = new fx.Accordion(
			toggles, stretchers, {opacity: true, duration: 400}
		);
		//hash function
		function checkHash(){
			var found = false;
			toggles.each(function(h3, i){
				if (window.location.href.indexOf(h3.title) > 0) {
					myAccordion.showThisHideOpen(stretchers[i]);
					found = true;
				}
			});
			return found;
		}
		if (!checkHash()) myAccordion.showThisHideOpen(stretchers[0]);
	}
	</script>
{/literal}
</head>
<body>
<div id="maincore1">
  <div id="topheader">
			{* Top Header START *}
			{include uri="design:top_header.tpl"}
			{* Top Header END *}
	</div>
  	<div id="right_side">
		
	  <div id="header"></div>
		<div id="main">
			<div class="padding">
				{* Main area START *}
				{include uri="design:page_mainarea.tpl"}
				{* Main area END *}
			</div>
		</div>
	</div>	
	<div id="left_side">
	<div id="logo">
	<img src={"logo-alares.jpg"|ezimage()} alt="logo alares" width="200" height="75" />
	</div>
{* Left menu START *}
{include uri="design:left_menu.tpl"}
{* Left menu END *}
{* Menu Banners START *}
{include uri="design:menu_banners.tpl"}
{* Menu Banners END *}
</div>	
	<div id="footer">
			{* Menu Bottom START *}
			{include uri="design:menu_bottom.tpl"}
			{* Menu Bottom END *}
			<div class="gotop">
		        <a href="#"><img src={"gotop.jpg"|ezimage()} alt="go top" width="40" height="45" border="0" /></a>
			</div>
	</div>
</div>
	<script type="text/javascript">
		Element.cleanWhitespace('moo-nav');
		init();
	</script>
	
<!--DEBUG_REPORT-->
  </body>
</html>

eZ Partner in Madrid (Spain)
Web: http://www.atela.net/

Andreas Kaiser

Wednesday 25 October 2006 3:44:44 am

Doing some test. I have created a new template called moo_menu.tpl with the code of the extension and called it from the pagelayout.tpl with:

{* Left menu START *}
{include uri="design:moo_menu.tpl"}
{* Left menu END *}

And now the menu is loading well?!!

eZ Partner in Madrid (Spain)
Web: http://www.atela.net/

eZ debug

Timing: Jan 18 2025 15:00:20
Script start
Timing: Jan 18 2025 15:00:20
Module start 'content'
Timing: Jan 18 2025 15:00:22
Module end 'content'
Timing: Jan 18 2025 15:00:22
Script end

Main resources:

Total runtime1.9443 sec
Peak memory usage4,096.0000 KB
Database Queries189

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0115 587.8281180.8281
Module start 'content' 0.01151.6749 768.6563514.5703
Module end 'content' 1.68640.2578 1,283.2266337.0703
Script end 1.9442  1,620.2969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00490.2545210.0002
Check MTime0.00220.1112210.0001
Mysql Total
Database connection0.00100.052410.0010
Mysqli_queries1.842894.78211890.0098
Looping result0.00240.12091870.0000
Template Total1.866296.020.9331
Template load0.00330.167320.0016
Template processing1.863095.818920.9315
Template load and register function0.00010.006710.0001
states
state_id_array0.00130.068810.0013
state_identifier_array0.00170.087320.0008
Override
Cache load0.00290.1472200.0001
Sytem overhead
Fetch class attribute can translate value0.00110.057320.0006
Fetch class attribute name0.00100.050730.0003
XML
Image XML parsing0.00070.037520.0004
class_abstraction
Instantiating content class attribute0.00000.000540.0000
General
dbfile0.01040.5326270.0004
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs