[Solved] How to properly override catalog list template?

Questions around the TYPO3 integration and plugins
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!
rowild

[Solved] How to properly override catalog list template?

Post by rowild » 12 Oct 2020, 21:59

Hi!

I cannot get the template override feature working.

In my extension I use an "aimeos__catalog-list" plugin, which has exactly 1 category assigned and should display all text and media elements of the that very category (only first level). I want to assign that plugin a new template called "body-startpage.php", which lies in the same folder as "body-standard.php":

`public/typo3conf/ext/theme/Resources/Private/Extensions/aimeos/client/html/templates/catalog/lists/body-startpage.php`

In the plugin's Typoscript configuration field I entered this line:

`client.html.catalog.lists.items.standard.template-body = catalog.lists.body-startpage`

But that does not seem to be correct, because the frontend displays the error message "A non -recoverable error occured".
(The contents of the category are displayed anyway, but it seems the system falls back to the standard template.)

Any idea what I am doing wrong?
Thank you!
Last edited by rowild on 13 Oct 2020, 19:56, edited 1 time in total.

rowild

Re: How to properly override catalog list template?

Post by rowild » 13 Oct 2020, 11:27

Anybody?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: How to properly override catalog list template?

Post by aimeos » 13 Oct 2020, 16:45

Use:

Code: Select all

client.html.catalog.lists.items.standard.template-body = catalog/lists/body-startpage
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

rowild

Re: How to properly override catalog list template?

Post by rowild » 13 Oct 2020, 19:55

Thank you very much! :D

The tricky part is to stick to dot notation only on the left-hand side of the equal sign, but keep slashes on the right-hand side!

Post Reply