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