How to change templates
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 29
- Joined: 21 Aug 2017, 09:42
How to change templates
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...
Neos 3.2.0 - Bitnami AWS C2 - Aimeos 2017-10.1
Re: How to change templates
Did you cleared the Aimeos content cache (./flow aimeos:cache) or configured no caching for development?
https://github.com/aimeos/aimeos-flow/b ... E.md#hints
https://github.com/aimeos/aimeos-flow/b ... E.md#hints
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 29
- Joined: 21 Aug 2017, 09:42
Re: How to change templates
Yes i cleared the caches and also configured to develope with no cache via Settings.yaml file nothing changes.
See image upload of both file tree where i have changed 'items-body-list.php' - but nothing shows any change in either of them. Can you confirm that this is the file i should change if i want to re-arrange things on the first page of the shop (/shop/list page)
See image upload of both file tree where i have changed 'items-body-list.php' - but nothing shows any change in either of them. Can you confirm that this is the file i should change if i want to re-arrange things on the first page of the shop (/shop/list page)
Neos 3.2.0 - Bitnami AWS C2 - Aimeos 2017-10.1
Re: How to change templates
No, "items-body-list.php" is the alternative list view (texts and price right of the image). The standard list view in generated by the "items-body-default.php" template file.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 29
- Joined: 21 Aug 2017, 09:42
Re: How to change templates
Thanks for your reply. As far as i could see, i needed to change the products-default in the common templates folder, then a change is happening (did this in ai-client-html). Then i tried to do this in my own extension (called ai-twelveinch) but nothing happends. Why not?
Neos 3.2.0 - Bitnami AWS C2 - Aimeos 2017-10.1
Re: How to change templates
Can you check if the manifest.php file of your own extension contains "ai-client-html" in the "depends" section?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 29
- Joined: 21 Aug 2017, 09:42
Re: How to change templates
In my own extension (ai-twelveinch) manifest i have following:
Code: Select all
return array(
'name' => 'ai-twelveinch',
'depends' => array(
'aimeos-core',
'ai-admin-extadm',
'ai-admin-jqadm',
'ai-admin-jsonadm',
'ai-client-html',
'ai-client-jsonapi',
'ai-controller-jobs',
),
'include' => array(
'lib/custom/src',
'client/html/src',
'client/jsonapi/src',
'controller/common/src',
'controller/frontend/src',
'controller/extjs/src',
'controller/jobs/src',
'admin/jsonadm/src',
'admin/jqadm/src',
),
'i18n' => array(
'admin' => 'admin/i18n',
'admin/jsonadm' => 'admin/jsonadm/i18n',
'controller/common' => 'controller/common/i18n',
'controller/frontend' => 'controller/frontend/i18n',
'controller/extjs' => 'controller/extjs/i18n',
'controller/jobs' => 'controller/jobs/i18n',
'mshop' => 'lib/custom/i18n',
'client' => 'client/i18n',
),
'config' => array(
'lib/custom/config',
),
'custom' => array(
'admin/jsonadm/templates' => array(
'admin/jsonadm/templates',
),
'admin/jqadm/templates' => array(
'admin/jqadm/templates',
),
'admin/extjs' => array(
'admin/extjs/manifest.jsb2',
),
'client/html/templates' => array(
'client/html/templates',
),
'client/jsonapi/templates' => array(
'client/jsonapi/templates',
),
'controller/extjs' => array(
'controller/extjs/src',
),
'controller/jobs' => array(
'controller/jobs/src',
),
'controller/jobs/templates' => array(
'controller/jobs/templates',
'client/html/templates',
),
),
'setup' => array(
'lib/custom/setup',
),
);
Neos 3.2.0 - Bitnami AWS C2 - Aimeos 2017-10.1
Re: How to change templates
Did you placed the modified "product-default.php" partial into the "client/html/templates/common/partials/" directory of your extension?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 29
- Joined: 21 Aug 2017, 09:42
Re: How to change templates
Where is your own extension located in your Flow application?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star