Changing Template Path...
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!
Changing Template Path...
Hey guys!
I am trying to customize the aimeos extension for TYPO3 but I have my problems with changing the template path for e.g. the category list. I read that I need to download a customize extension of aimeos which I did and put it in typo3conf/ext. Now I copied all templates which I want to customize from the aimeos extension to my own and changed some code.
And now what's next? I tried to write something in my main setup file but didn't work:
Can anyone of you give me some hint here?
I also saw in the TYPO3 TyposcriptObjectBrowser that there is a field for customcss + customjs but I couldn't reach it with typoscript either. What am I overseeing?
I am trying to customize the aimeos extension for TYPO3 but I have my problems with changing the template path for e.g. the category list. I read that I need to download a customize extension of aimeos which I did and put it in typo3conf/ext. Now I copied all templates which I want to customize from the aimeos extension to my own and changed some code.
And now what's next? I tried to write something in my main setup file but didn't work:
Code: Select all
plugin.tx_aimeos.settings.client.html.catalog.lists.standard.template-body = /typo3conf/ext/aimeos_custom/client/html/catalog/lists/body-standard.php
I also saw in the TYPO3 TyposcriptObjectBrowser that there is a field for customcss + customjs but I couldn't reach it with typoscript either. What am I overseeing?
Re: Changing Template Path...
hi, u forgot *items* i believe.
"client/html/catalog/lists/items/standard/template-body = catalog/lists/items-body-standard.php"
see here https://aimeos.org/docs/Configuration/C ... plate-body
and instead of typoscript value plugin.tx_aimeos.settings.client.html.catalog.lists.standard.template-body i would register it in /*your extension*/Ressources/Private/Extensions/*your extension*/config/client.php
"client/html/catalog/lists/items/standard/template-body = catalog/lists/items-body-standard.php"
see here https://aimeos.org/docs/Configuration/C ... plate-body
and instead of typoscript value plugin.tx_aimeos.settings.client.html.catalog.lists.standard.template-body i would register it in /*your extension*/Ressources/Private/Extensions/*your extension*/config/client.php
Code: Select all
<?php
return [
'html' => [
'client' => [
'html' => [
'catalog' => [
'lists' => [
'items' => [
'standard' [
'template-body' => 'YourNewTemplateName'
]
]
]
]
]
]
],
'jsonapi' => [
],
];
Re: Changing Template Path...
To overwrite existing templates with the same name, you don't need any configuration. Only copy the template into the same directory structure in your Aimeos TYPO3 extension (./Resources/Private/Extensions/<extname>/client/html/templates/)
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
Re: Changing Template Path...
Thanks for the quick response! I don't want to change the thing with the items, just the main body-template of the list (https://aimeos.org/docs/Configuration/C ... plate-body).
My code looks like this now:
in main setup.t3s:
in typo3conf/ext/aimeos_custom/config/client.php:
But it doesn't work. What I am wondering about is where does the aimeos extension know if it should use a custom template path from another extension or not?
My code looks like this now:
in main setup.t3s:
Code: Select all
plugin.tx_aimeos.settings.client.catalog.lists.standard.template-body = catalog/lists/body-standard.php
Code: Select all
<?php
return [
'html' => [
'client' => [
'html' => [
'catalog' => [
'lists' => [
'standard' [
'template-body' => 'body-standard.php'
]
]
]
]
]
],
'jsonapi' => [],
];
Re: Changing Template Path...
So you mean I just could edit the default template file? That's what I did but I read not to overwrite default templates and I find it cleaner to use a path to a custom template instead of overwriting the default.aimeos wrote:To overwrite existing templates with the same name, you don't need any configuration. Only copy the template into the same directory structure in your Aimeos TYPO3 extension (./Resources/Private/Extensions/<extname>/client/html/templates/)
Re: Changing Template Path...
As the admin said if u name your template like the standard one "body-standard.php" you dont need a config file or a setup.ts to register it. Just use the same directory structure in your extension and it will automatically included.
- And no dont edit the default one.
- Copy the default one in your extension, with the same directory structure . edit it and voilà
But if you want give the template a new name you must register it with a config file or setup.ts. And here u cant name it like the default "body-standard.php"!
Perhaps my config was wrong. Try it without html array.
- And no dont edit the default one.
- Copy the default one in your extension, with the same directory structure . edit it and voilà
But if you want give the template a new name you must register it with a config file or setup.ts. And here u cant name it like the default "body-standard.php"!
Perhaps my config was wrong. Try it without html array.
Code: Select all
<?php
return [
'client' => [
'html' => [
'catalog' => [
'lists' => [
'standard' [
'template-body' => 'NewTemplateName'
]
]
]
]
],
'jsonapi' => [
],
];
Re: Changing Template Path...
Ok there must be a point which I miss.tenkraD wrote:Just use the same directory structure in your extension and it will automatically included.
- Copy the default one in your extension, with the same directory structure . edit it and voilà
I deleted now the added things in the config + setup. All I have is the installed aimeos extension, in my "typo3conf > ext" I have the custom extension from the downloader called aimeos-custom and copied the file "catalog > lists > body-standard.php" from the original aimeos extension to my custom extension in "client > html > catalog > lists" and edited it. But in browser only the default file is shown.
Re: Changing Template Path...
Just to get clear:
- 1.) For Your Aimeos extension, build with the extensionbuilder from aimeos, You have choosen the Aimeos Version witch matches your Typo3 Version.
- 2.) Your extension is in typo3conf/ext/ directory and u have activated your extension in the typo3 extension manager
- 3.) You have copied the "body-standard.php" file from aimeos extension /typo3conf/ext/aimeos/Resources/Private/Extensions/ai-client-html/client/html/templates/catalog/lists/body-standard.php to /typo3conf/ext/<yourExtensionName>/Resources/Private/Extensions/<yourExtensionName>/client/html/templates/catalog/lists/body-standard.php
- 4.) You edited the body-standard file in /typo3conf/ext/<yourExtensionName>/Resources/Private/Extensions/<yourExtensionName>/client/html/templates/catalog/lists/body-standard.php
and its not working?
- 1.) For Your Aimeos extension, build with the extensionbuilder from aimeos, You have choosen the Aimeos Version witch matches your Typo3 Version.
- 2.) Your extension is in typo3conf/ext/ directory and u have activated your extension in the typo3 extension manager
- 3.) You have copied the "body-standard.php" file from aimeos extension /typo3conf/ext/aimeos/Resources/Private/Extensions/ai-client-html/client/html/templates/catalog/lists/body-standard.php to /typo3conf/ext/<yourExtensionName>/Resources/Private/Extensions/<yourExtensionName>/client/html/templates/catalog/lists/body-standard.php
- 4.) You edited the body-standard file in /typo3conf/ext/<yourExtensionName>/Resources/Private/Extensions/<yourExtensionName>/client/html/templates/catalog/lists/body-standard.php
and its not working?
Re: Changing Template Path...
You created a bare Aimeos extension instead of an Aimeos TYPO3 extension and copied that to your ./typo3conf/ext/ folder. That doesn't work. Create a TYPO3 extension instead and copy your templates you want do modify into ./typo3conf/ext/<extname>/Resources/Private/Extensions/<extname>/client/html/templates/
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
Re: Changing Template Path...
Ah ok thanks for the clarification. When I want to upload the custom aimeos folder, the typo3 extension manager throws an error saying "Extension aimeos-custom is not available". Guess I have to handle this until it finally works