0
Welcome Guest! Login
0 items Join Now

Custom module Chrome for sidebar position

  • Custom module Chrome for sidebar position

    Posted 13 years 1 month ago
    • Hi

      Just started working with the gantry framework - nice so far ;-)

      I got one question regarding the tutorial on the gantry-framework website for the Custom Module Chrome implementation.

      I created a customized module chrome in the modules.php file.
      function modChrome_sidebarTry($module, &$params, &$attribs)
      {
          if (!empty ($module->content)) : ?>
              <?php if ($params->get('moduleclass_sfx')!='') : ?>
              <div>
              <div class="<?php echo $params->get('moduleclass_sfx'); ?>">
              <?php endif; ?>
                  <div class="rt-block">
                      <?php if ($module->showtitle != 0) : ?>
                      <div class="module-title-surround"><div class="module-title"><h2 class="title" style="float:left;"><?php echo $module->title; ?></h2><a href="javascript&#058;void(0)" onclick="hideElement('showCaseMod<?php print $module->id?>');">Hide</a> | <a href="javascript&#058;void(0)" onclick="showElement('showCaseMod<?php print $module->id?>');">Show</a></div></div>
                      <?php endif; ?>
                      <div class="module-surround">
                          <div class="module-inner">
                              <div class="module-content">
                              <div id="showCaseMod<?php print $module->id?>">
                                  <?php echo $module->content; ?>
                                  </div>
                                  <div class="clear"></div>
                              </div>
                          </div>
                      </div>
                  </div>
              <?php if ($params->get('moduleclass_sfx')!='') : ?>
              </div>
              </div>
          <?php endif; ?>
          <?php endif;
      }

      I only want this chrome module to show up in the sidebar-c position.

      on the gantry website is written:
      <?php echo $gantry->displayMainbody('mainbody','sidebar', sidebarchromelayout, contenttoplayoutname, contenttopchromename, contentbottomlayoutname, contentbottomchromename); ?>
       

      Could you please help me how to modify the code to show my custom module chrome only on the sidebar?

      Thanks for your help in advance

      Regards,
      Menelik

Time to create page: 0.036 seconds