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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 16:07:10
Script start
Timing: Jan 18 2025 16:07:10
Module start 'layout'
Timing: Jan 18 2025 16:07:10
Module start 'content'
Timing: Jan 18 2025 16:07:10
Module end 'content'
Timing: Jan 18 2025 16:07:10
Script end

Main resources:

Total runtime0.0154 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 589.4922152.6406
Module start 'layout' 0.00460.0028 742.132839.4766
Module start 'content' 0.00740.0062 781.609497.3984
Module end 'content' 0.01360.0017 879.007838.3047
Script end 0.0153  917.3125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002314.9705140.0002
Check MTime0.00106.6915140.0001
Mysql Total
Database connection0.00074.662010.0007
Mysqli_queries0.002113.618630.0007
Looping result0.00000.077510.0000
Template Total0.00148.910.0014
Template load0.00074.793810.0007
Template processing0.00064.031010.0006
Override
Cache load0.00053.381410.0005
General
dbfile0.00159.914780.0002
String conversion0.00000.058940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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