How to change templates
Posted: 24 Oct 2017, 16:40
On my front page (shop/list) i want to move the bottom text of the product, up on top of the product image.
So, i have created an extension via Aimeos extension builder named: ai-myname and placed this in the Extension folder of Neos.
Then i copied the templates from client/html/templates and placed them in the same position in my extension.
Then i tried to move the html code from various templates to be before the image section:
This does not seem to make any changes to the output. In your documentation you write:
"Extensions that depend on the core and contain PHP template files in the client/html/templates/ directory named the same as existing ones are used first."
So i asumed that any change in my extension would change the output, but can you please explain which template i should work in, for the front page of the shop.
Thanks...
So, i have created an extension via Aimeos extension builder named: ai-myname and placed this in the Extension folder of Neos.
Then i copied the templates from client/html/templates and placed them in the same position in my extension.
Then i tried to move the html code from various templates to be before the image section:
Code: Select all
<div class="text-list">
<h2 itemprop="name"><?= $enc->html( $productItem->getName(), $enc::TRUST ); ?></h2>
<?php foreach( $productItem->getRefItems( 'text', 'short', 'default' ) as $textItem ) : ?>
<div class="text-item" itemprop="description">
<?= $enc->html( $textItem->getContent(), $enc::TRUST ); ?><br/>
</div>
<?php endforeach; ?>
</div>
This does not seem to make any changes to the output. In your documentation you write:
"Extensions that depend on the core and contain PHP template files in the client/html/templates/ directory named the same as existing ones are used first."
So i asumed that any change in my extension would change the output, but can you please explain which template i should work in, for the front page of the shop.
Thanks...