Jump to content

Default theme modification


Recommended Posts

Hello,

 

I am new to prestashop and want to create personal theme. I have never faced prestashop and smarty. So i decided to study default theme to create my own having a template from default theme. I just wanted to delete banner block, so i find piece of code where is that block banner in header.tpl

{capture name='displayBanner'}{hook h='displayBanner'}{/capture}
{if $smarty.capture.displayBanner}
	<div class="banner">
		<div class="container">
			<div class="row">
				{$smarty.capture.displayBanner}
			</div>
		</div>
	</div>
{/if}

So, i deleted that code, refreshed the page and nothing happend. Why? How i can delete modules from default templates to create my own? And yes, i understand that i can turn it off in admin panel, but i am interested in deleting it from theme.

 

Thanks everyone in advance

Link to comment
Share on other sites

some modules are overriden in the default theme.

Take a look  at  themes/default-bootstrap/modules/blockbanner

Why not just unhook the modules you don't nedd?

I don't have this folder.

It is so easy to turn it off from admin panel. I want to understand how prestashop works so i just tried and nothing happend. It was a signal that i don't know something so i asked question here :)

Edited by Parlament (see edit history)
Link to comment
Share on other sites

If you open the main controller of blockbanner module (module responsible for showing the banner) and see the hookDisplayTop() function, you will see a file is responsible for showing the banners (i.e. blockbanner.tpl)

 

This file can be found at the following path:

 

/modules/blockbanner/blockbanner.tpl

 

You can try removing the code from this file to remove the banners.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...