Reputation: 31
Hello im trying to understand a bit better the way prestashop 1.7 generates the templates, right now i know that new prestashop .tpl files use extends to create the website.
I want to know in what file where is the page_content created..
Right now i know this:
1.- The index page of prestashop is generated using index.tpl
{extends file='page.tpl'}
{block name='page_content'}
{block name='hook_home'}
{$HOOK_HOME nofilter}
{/block}
{/block}
2- Then it calls the page.tpl file
{extends file=$layout}
{block name='content'}
<section id="main">
{block name='page_header_container'}
<header class="page-header">
{block name='page_header'}
<h1>{block name='page_title'}{/block}</h1>
{/block}
</header>
{/block}
{block name='page_content_container'}
<section id="content" class="page-content">
{block name='page_content'}
<!-- Page content -->
{/block}
</section>
{/block}
{block name='page_footer_container'}
<footer class="page-footer">
{block name='page_footer'}
<!-- Footer content -->
{/block}
</footer>
{/block}
</section>
{/block}
3.- And it extends a layout.tpl file (i'll just add the piece of code where it is called)
{block name='content_wrapper'}
<div id="content-wrapper" class="left-column right-column">
{block name='content'}
<p>Hello world! This is HTML5 Boilerplate.</p>
{/block}
</div>
{/block}
Right here im fine i understand the system, the problem is that i want to know from where, the prestashop banner is being linked, the banner.tpl only just have this:
<a class="banner" href="{$banner_link}">
{if isset($banner_img)}
<img src="{$banner_img}" alt="{$banner_desc}" title="{$banner_desc}">
{else}
<span>{$banner_desc}</span>
{/if}
</a>
And in the final html output is being shown Click here
Can someone help me to drive deeper into this?
Upvotes: 3
Views: 2962
Reputation: 11
If you write {debug}
in the *.tpl file you can get the debug window of Smarty that show you all PHP variables, that sent to this template.
For searching this variables I'm trying 'search by text' for all project.
Upvotes: 1