Refactor CMS page template for improved readability and consistency

- Adjusted indentation and spacing for better code structure in page.tpl
- Ensured consistent use of block syntax and formatting
- Maintained functionality of the Paypo iframe integration and CMS content display
This commit is contained in:
2025-04-09 23:17:52 +02:00
parent 9a626b304e
commit 709798f77c
17 changed files with 4489 additions and 4486 deletions

View File

@@ -22,49 +22,49 @@
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{extends file='page.tpl'}
{extends file='page.tpl'}
{block name='page_title'}
{$cms.meta_title}
{/block}
{block name='page_title'}
{$cms.meta_title}
{/block}
{block name='page_content_container'}
<section id="content" class="page-content page-cms page-cms-{$cms.id}">
{if $cms.id == 61}
<iframe id="paypoIframe" src="https://start.paypo.pl" width="100%" frameborder="no"></iframe>
{literal}
<script type="module">
window.addEventListener('message', event => {
const paypoIframe = document.querySelector('#paypoIframe');
{block name='page_content_container'}
<section id="content" class="page-content page-cms page-cms-{$cms.id}">
{if $cms.id == 61}
<iframe id="paypoIframe" src="https://start.paypo.pl" width="100%" frameborder="no"></iframe>
{literal}
<script type="module">
window.addEventListener('message', event => {
const paypoIframe = document.querySelector('#paypoIframe');
const eventData = JSON.parse(event.data);
const eventData = JSON.parse(event.data);
let isPageHeightSet = false;
let isPageHeightSet = false;
if (typeof eventData === "object") {
if ('pageBodyHeight' in eventData) {
paypoIframe.style.height = eventData.pageBodyHeight + 'px';
isPageHeightSet = true;
} else {
isPageHeightSet || (paypoIframe.style.height = '5200px');
}
}
});
</script>
{/literal}
{/if}
if (typeof eventData === "object") {
if ('pageBodyHeight' in eventData) {
paypoIframe.style.height = eventData.pageBodyHeight + 'px';
isPageHeightSet = true;
} else {
isPageHeightSet || (paypoIframe.style.height = '5200px');
}
}
});
</script>
{/literal}
{/if}
{block name='cms_content'}
{$cms.content nofilter}
{/block}
{block name='cms_content'}
{$cms.content nofilter}
{/block}
{block name='hook_cms_dispute_information'}
{hook h='displayCMSDisputeInformation'}
{/block}
{block name='hook_cms_dispute_information'}
{hook h='displayCMSDisputeInformation'}
{/block}
{block name='hook_cms_print_button'}
{hook h='displayCMSPrintButton'}
{/block}
{block name='hook_cms_print_button'}
{hook h='displayCMSPrintButton'}
{/block}
</section>
{/block}
</section>
{/block}