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:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user