Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • charles99 Friend
    #927198

    I am seeking to add a new module position in the header and mainbody/component area and would like to know the files I need to edit…

    Here is what I have but not sure of the setup of this template. Normally I would just attack the index.php file or make my edits by moving the loadBlocks around. But everything seem to be connected to the helper file now… So a little direction would allow me to fully use this template..

    Componenet.php

    <body class="contentpane modal">
    <jdoc:include type="message" />
    <jdoc:include type="top" /> (new position)
    <jdoc:include type="component" />
    <jdoc:include type="bottom" /> (new position)

    Index.php

        <?php if($this->countModules('mmenu')) : ?>
             <div class="mmenu">
                 <jdoc:include type="modules" name="mmenu" style="none" />           (new position)
             </div>
        <?php endif ?>  
    
    <!-- // HEADER -->
    
                <!-- Content -->
                <main id="content" class="content <?php echo $helper->_('main-class') ?>" role="main">
    
                    <!-- Breadcrums -->
                    <jdoc:include type="modules" name="position-2" style="none" />
                    <!-- // Breadcrums -->
    
                    <jdoc:include type="message" />
                    <jdoc:include type="modules" name="top" style="JAxhtml" />         (new position)
                    <jdoc:include type="component" />
                    <jdoc:include type="modules" name="bottom" style="JAxhtml" />         (new position)
                </main>
                <!-- // Content -->

    Again I am seeking to place a new module position in the header and 2 new positions in the mainbody.

    Thanks

    Ninja Lead Moderator
    #928158

    Hi,

    I’m not sure what did you change on your site? But you can apply both ways to add new position on your site

    • Case 1:

      <?php if ($helper->has('new-position')) : ?>
      <jdoc:include type="modules" name="<?php $helper->_('new-position') ?>" style="raw" />
      <?php endif; ?>
    • Case 2:

      <?php if($this->countModules('new-position')) : ?>
      <jdoc:include type="modules" name="new-position" style="raw" ></jdoc:include>
      <?php endif ?>

    Please give me the URL of your site and admin login via your reply and set as private reply. I will help you to check the problem directly on your site.

    Regards

    charles99 Friend
    #928480

    Ok, this is what I intend to place in the Index.php file:

                <!-- Content -->
                <main id="content" class="content <?php echo $helper->_('main-class') ?>" role="main">
    
                    <!-- Breadcrums -->
                    <jdoc:include type="modules" name="position-2" style="none" />
                    <!-- // Breadcrums -->
    
                    <jdoc:include type="message" />
                                           <?php if ($helper->has('top9')) : ?>
                                      <div class="top9">
                                        <jdoc:include type="modules" name="<?php $helper->_('top9') ?>" style="raw" />
                                      </div>
                                       <?php endif; ?>                  
                      <jdoc:include type="component" />
                                       <?php if ($helper->has('bottom9')) : ?>
                                     <div class="bottom9">
                                       <jdoc:include type="modules" name="<?php $helper->_('bottom9') ?>" style="raw" />
                                       </div>
                                      <?php endif; ?>   
                </main>
                <!-- // Content -->

    I am trying to add a new module position above and below the Main Content area. Will the above work and do I have edit any other file? TemplateDetail.xml file I already edited… The Helper.php is new so I need to know if I have to place anything in it to get the module position to show or work…

    Thanks…

    Ninja Lead Moderator
    #928739

    You can define new position from templates/ja_simpli/index.php file as my suggested here and define position from templates/ja_simpli/templateDetails.xml file


    1. Screen-Shot-2016-05-10-at-10.23.16
    charles99 Friend
    #930376

    Do you have demo site where you added a new module positions? I place everything in the right files and the new module positions does not show! Can you add a new module position to see if it another bug that needs to be fixed…

    Case 1 and Case 2 does not work!

    thanks

    Ninja Lead Moderator
    #930947

    I added both positions at my end and you can follow the steps

    • Open templates/ja_simpli/index.php file and add both positions

    from

    <jdoc:include type="message" ></jdoc:include>
    <jdoc:include type="component" ></jdoc:include>

    to

    <jdoc:include type="message" ></jdoc:include>
    <?php if($this->countModules('top9')) : ?>
          <div class="top9">
            <jdoc:include type="modules" name="top9" style="JAxhtml" ></jdoc:include>
          </div>
    <?php endif; ?>  
    <jdoc:include type="component" ></jdoc:include>
    <?php if($this->countModules('bottom9')) : ?>
        <div class="bottom9">
           <jdoc:include type="modules" name="bottom9" style="JAxhtml" ></jdoc:include>
        </div>
    <?php endif; ?>

    and you can see it’s working as my screenshot


    1. Screen-Shot-2016-05-16-at-11.49.58
    2. Screen-Shot-2016-05-16-at-11.49.43
    charles99 Friend
    #931128

    Ok I see the problem! When you add a new Module Position to this template it does not show in the template Manager and this is what should be pointed out!!!!!!

    Everything you outlined is what I have done for other Joomlart templates, not knowing what I added would not show in the Template Manager lead me to seek help in creating a new Module Position in Ja Simpli Template.

    So for anyone else seeking to add a new module position please be aware that your new module position may not show up in the template manager area but is you check the module positions in the template manager section by click on preview you will be able to see the new module position you added… …

    And thanks for your insight Ninja…

    charles99 Friend
    #931129

    Ninja,

    I have one more question for you…

    Can you move the menu to the banner-top position without running into any problems? I need to have the menu on the same row as my logo. Or do you have to use the index.php file to move the menu module position to the header section?

    Thanks…

    Ninja Lead Moderator
    #931309

    @charles99: If you want to make a control ON/OFF backend of your site, maybe you need to custom from templates/ja_simpli/helper.php file and find // main content section with col1-pos and col2-pos positions and templates/ja_simpli/index.php file and apply the same with new position on your site but I am afraid it’s not easy to do.

    About the other request it is very hard to do and you should submit the request here .

    tramber91 Friend
    #935495

    Hi

    i have tested your code

    <jdoc:include type="message" ></jdoc:include>
    <?php if($this->countModules('top9')) : ?>
          <div class="top9">
            <jdoc:include type="modules" name="top9" style="JAxhtml" ></jdoc:include>
          </div>
    <?php endif; ?>  
    <jdoc:include type="component" ></jdoc:include>
    <?php if($this->countModules('bottom9')) : ?>
        <div class="bottom9">
           <jdoc:include type="modules" name="bottom9" style="JAxhtml" ></jdoc:include>
        </div>
    <?php endif; ?>

    not ok on my side ?

    ok like that

    <jdoc:include type="message" />
    <?php if($this->countModules('position-11')) : ?>
        <div class="position-11">
           <jdoc:include type="modules" name="position-11" style="JAxhtml" />
        </div>
    <?php endif; ?>
    <jdoc:include type="component" />
    <?php if($this->countModules('position-10')) : ?>
        <div class="position-10">
           <jdoc:include type="modules" name="position-10" style="JAxhtml" />
        </div>
    <?php endif; ?>

    replace

    <jdoc:include type="component" ></jdoc:include>

    by

    <jdoc:include type="component" />

    take care

    http://www.aide-joomla.com/

    Ninja Lead Moderator
    #935826

    @tramber91: Thanks for your sharing

Viewing 11 posts - 1 through 11 (of 11 total)

This topic contains 10 replies, has 3 voices, and was last updated by  charles99 8 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum