Jump to content

removing "box.featured.php" and "box.popular.php" from product page


Recommended Posts

I have noticed that removing :

               <div class="large-3 columns show-for-large-up" id="sidebar_left">
                  {include file='templates/box.featured.php'}
                  {include file='templates/box.popular.php'}
                  {include file='templates/box.sale_items.php'}
               </div>

from "main.php" does the job but then these boxes also disappear from home page. 

 

Thank you for your help.

Link to comment
Share on other sites

Putting two and two together, we believe that you wish to suppress the sidebar unless the himepage is being shown.

If so, then wrap the sidebar in Smarty code to not display it except on the home page. In the skin template main.php:

Find:

<div class="row {$SECTION_NAME}_wrapper">
   <div class="small-12 large-9 columns" id="main_content">
      {include file='templates/box.errors.php'}
      {include file='templates/box.progress.php'}
      {$PAGE_CONTENT}
   </div>
   <div class="large-3 columns show-for-large-up" id="sidebar_left">
      {include file='templates/box.featured.php'}
      {include file='templates/box.popular.php'}
      {include file='templates/box.sale_items.php'}
   </div>
   <a href="#" class="back-to-top"><span class="show-for-small-only"><svg class="icon"><use xlink:href="#icon-angle-up"></use></svg></span><span class="show-for-medium-up"><svg class="icon"><use xlink:href="#icon-angle-up"></use></svg> {$LANG.common.top}</span></a>
</div>

Change to:

<div class="row {$SECTION_NAME}_wrapper">
   <div class="small-12 {if $SECTION_NAME eq 'home'}large-9{/if} columns" id="main_content">
      {include file='templates/box.errors.php'}
      {include file='templates/box.progress.php'}
      {$PAGE_CONTENT}
   </div>
{if $SECTION_NAME eq 'home'}
   <div class="large-3 columns show-for-large-up" id="sidebar_left">
      {include file='templates/box.featured.php'}
      {include file='templates/box.popular.php'}
      {include file='templates/box.sale_items.php'}
   </div>
{/if}
   <a href="#" class="back-to-top"><span class="show-for-small-only"><svg class="icon"><use xlink:href="#icon-angle-up"></use></svg></span><span class="show-for-medium-up"><svg class="icon"><use xlink:href="#icon-angle-up"></use></svg> {$LANG.common.top}</span></a>
</div>

Only if $SECTION_NAME is 'home' will the main area narrow to nine columns and the sidebar be shown. Otherwise, the main area takes the entire twelve columns.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...