my site in 3.1

the template is protostar


Adding positions to the template

In fact the template already contains the positions heading 4, heading 5, heading 6,
This is reflected in the description file:

templateDetails.xml

...
position-4
position-5
position-6
...

But they do not appear in the initial implementation file index.php

The aim was to add under Articles 3 headings:

Changes

Addition of 3 positions

Index.php file

<div>
 <?php if ($this->countModules(&#039;position-7&#039;)):?>
  <div id="aside" class="span3">
    <!-- Begin Right Sidebar -->
    <jdoc:include type="modules" name="position-7" style="well" />
    <!-- End Right Sidebar -->
  </div>
  <?php endif; ?>
</div>
<!-- ajout du row pour les 3 positions -->
<div class="row-fluid">
  <?php if ($this->countModules(&#039;position-4&#039;)): ?>
  <!-- Begin Sidebar -->
  <div id="sidebar" class="span4">
    <div class="sidebar-nav">
      <jdoc:include type="modules" name="position-4" style="xhtml" />
    </div>
  </div>
  <!-- End Sidebar -->
  <?php endif; ?>
  <?php if ($this->countModules(&#039;position-5&#039;)): ?>
  <!-- Begin Sidebar -->
  <div id="sidebar" class="span4">
    <div class="sidebar-nav">
      <jdoc:include type="modules" name="position-5" style="xhtml" />
    </div>
  </div>
  <!-- End Sidebar -->
  <?php endif; ?>
  <?php if ($this->countModules(&#039;position-6&#039;)): ?>
  <!-- Begin Sidebar -->
  <div id="sidebar" class="span4">
    <div class="sidebar-nav">
      <jdoc:include type="modules" name="position-6" style="xhtml" />
    </div>
  </div>
  <!-- End Sidebar -->
  <?php endif; ?>
</div>

Replace or delete footer content

We can then add a custom module to the position footer

Index.php file

<footer class="footer" role="contentinfo">
  <div class="container<?php echo ($params->get(&#039;fluidContainer&#039;) ? &#039;-fluid&#039; : &#039;&#039;); ?>">
    <hr />
    <jdoc:include type="modules" name="footer" style="none" />
    <!--<p class="pull-right">
     <a href="#top" id="back-top">
       <?php echo JText::_(&#039;TPL_PROTOSTAR_BACKTOTOP&#039;); ?>
     </a>
   </p>
   <p>
     &amp;copy; <?php echo date(&#039;Y&#039;); ?> <?php echo $sitename; ?>
   </p>-->
  </div>
</footer>

Use javascript with the latest version 3.6.x

It is possible to write a suitable code in the associated file user.js, for example here to remove the unused part of the footer

User.js file

(function($)
{
  $(document).ready(function()
  {
    var footer = $("body footer");    
    if (footer) {
      var pullright = footer.find(".pull-right");
      if (pullright)
      {
        pullright.hide();
        pullright.next().hide();
        pullright.text("");        
      }      
    }    
  });
})(jQuery);