Forums / Setup & design / my .tpl don't show left menu !! [extension->module]

my .tpl don't show left menu !! [extension->module]

Author Message

Eder Silva

Friday 02 March 2007 6:58:35 am

Hi my friends !!

When my module calls my students.tpl the left_menu don't show anymore...

I don't know why ... this is my code:

my module.php:

$ViewList['students'] = array(
             'default_navigation_part' => 'ezcontentnavigationpart',
             'script' => 'students.php',
             'params' => array('id','msg') );

my students.php

$Result = array();
$Result['content'] = & $tpl->fetch( "design:students.tpl" );
$Result['flat_left'] = & $tpl->fetch( "design:flat_left.tpl" );

I try this too:

$Result['navigation_part'] = & $tpl->fetch( "design:flat_left.tpl" );

my students.tpl shows ok, but left_menu no.

I just want to keep the default left_menu when I access my module...

Thanks for any help !!

André R.

Friday 02 March 2007 7:12:03 am

this is how one of the views in newsletter does it:

$Result = array();
$Result['newsletter_menu'] = 'design:parts/content/newsletter_menu.tpl';
$Result['left_menu'] = 'design:parts/content/eznewsletter_menu.tpl';
$Result['content'] =& $tpl->fetch( "design:$extension/list_newsletter_type.tpl" );
$Result['path'] = array( array( 'url' => false,
                               'text' => ezi18n( 'eznewsletter', 'Newsletter types' ) ) );

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

Eder Silva

Friday 02 March 2007 10:04:11 am

Hello Andre !

Sorry, but I can't understand....my code is the same your code now, but....doesn't work...

I'm use 3.9 with ezwebin package ...

I don't know What can I do !

Thanks....

Łukasz Serwatka

Tuesday 25 September 2007 5:54:31 am

$Result['left_menu'] variable is used by administration interface design. In pagelayout you can find:

{if is_set( $module_result.left_menu )}
    {include uri=$module_result.left_menu}
{/if}

You can add code above in ezwebin paglayout.tpl then in your module view add:

$Result['left_menu'] = & $tpl->fetch( "design:left_menu.tpl" );

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Damien Pobel

Tuesday 25 September 2007 10:50:43 am

Hi

Łukasz, if in pagelayout.tpl there's

   {include uri=$module_result.left_menu}

I think that in you're PHP code $Result['left_menu'] should be a path to a template file, for example :

$Result['left_menu'] = "design:flat_left.tpl" ;

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Łukasz Serwatka

Tuesday 25 September 2007 2:54:28 pm

Hi Damien,

Yes, correct. Of course path to TPL should be provided.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

eZ debug

Timing: Jan 18 2025 11:41:01
Script start
Timing: Jan 18 2025 11:41:01
Module start 'content'
Timing: Jan 18 2025 11:41:01
Module end 'content'
Timing: Jan 18 2025 11:41:01
Script end

Main resources:

Total runtime0.1850 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 589.2891180.8125
Module start 'content' 0.00760.0053 770.1016101.9609
Module end 'content' 0.01290.1721 872.0625531.1250
Script end 0.1850  1,403.1875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00371.9860200.0002
Check MTime0.00150.8070200.0001
Mysql Total
Database connection0.00160.890610.0016
Mysqli_queries0.133872.30851410.0009
Looping result0.00221.19801390.0000
Template Total0.171792.810.1717
Template load0.00090.461510.0009
Template processing0.170892.319610.1708
Override
Cache load0.00060.326410.0006
Sytem overhead
Fetch class attribute can translate value0.00180.992810.0018
XML
Image XML parsing0.00030.147010.0003
General
dbfile0.00201.0565200.0001
String conversion0.00000.003230.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs