Jump to content


Photo

contents above the tabs on prestashop homepage


  • Please log in to reply
1 reply to this topic

#1 vekia

vekia

    Advanced Member

  • Members
  • PipPipPip
  • 10166 posts

Posted 16 December 2017 - 03:50 AM

Today i received a request:

Hello Milosz i need your help please : i have put some home tabs with Homepage Products Pro and then also add an html box on displayHomeTabContent position with HTML box pro. i want to put this box above tabs name. i move htmlpro in displayHome position top the top ... but ... don't work thanks you for your help 

 

 

post below you can find an answer for this :-)


free tutorials, free templates, free addons, prestashop modules MndfRK4.png  lpHMrZ5.png  gtKHYO7.png  google-48.png


looking for the best presta addons with outstanding support? check this: PrestaShop Modules

#2 vekia

vekia

    Advanced Member

  • Members
  • PipPipPip
  • 10166 posts

Posted 16 December 2017 - 03:51 AM

Hello

 

then also add an html box on displayHomeTabContent position with HTML box pro

 

 

displayHomeTabContent shows contents INSIDE the tabs feature, this is why you show it below the tabs' names.
 

i move htmlpro in displayHome position top the top

displayHome tab show contents below the tabs on homepage, so if you will add own contents there - these contents will appear below the tabs' names and tabs' contents.

 



By default - prestashop does not have a hook above the tabs. This means that in this case the best solution will be a custom hook.
Let's name it 'displayAboveTabs'. Go to html box pro configuration page and scroll configuration screen to section "custom positions". Put there "displayAboveTabs": https://i.imgur.com/9AieC63.png and "add new hook".
Create new block in this hook and then copy code to execute it: 

{hook::exec('displayAboveTabs')}Then go to /themes/default-bootstrap/index.tpl file and paste the code to execute the hook above the code:
{hook::exec('displayAboveTabs')}
{if isset($HOOK_HOME_TAB_CONTENT) && $HOOK_HOME_TAB_CONTENT|trim}
    {if isset($HOOK_HOME_TAB) && $HOOK_HOME_TAB|trim}
        <ul id="home-page-tabs" class="nav nav-tabs clearfix">
      {$HOOK_HOME_TAB}
  </ul>
 {/if}
 <div class="tab-content">{$HOOK_HOME_TAB_CONTENT}</div>
{/if}

after save your block will appear above the tabs, as on example: https://i.imgur.com/a2cbkcu.png


free tutorials, free templates, free addons, prestashop modules MndfRK4.png  lpHMrZ5.png  gtKHYO7.png  google-48.png