Custom Template

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
AzizOzbek
Posts: 1
Joined: 09 Mar 2023, 08:01

Custom Template

Post by AzizOzbek » 09 Mar 2023, 08:08

Hi
I wanna customize the frontend of aimeos. I tried the create custom blade template with following tutorial, but it does not work:
https://aimeos.org/docs/latest/laravel/customize/

For example i want to create a custom profile page. Therefor i have to create blade.php file within following directory right?:

Code: Select all

myproject/resources/views/templates/client/html/account/profile/body.blade.php
The content of the page looks like this:

Code: Select all

<?php $this->block()->start( 'account/profile/body' ); ?>
<div class="actions">
    ...
</div>
<?php $this->block()->stop(); ?>
<?php echo $this->block()->get( 'account/profile/body' ); ?>
What am i doing wrong?

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

Re: Custom Template

Post by aimeos » 10 Mar 2023, 09:17

1.) Create an Aimeos extension for your project first: https://aimeos.org/extensions
2.) Install the extension like described here: https://aimeos.org/docs/latest/developer/extensions/
3.) Copy the existing vendor/aimeos/ai-client-html/templates/client/html/account/profile/body.php to your own extension in ./packages/<yourext>/templates/client/html/account/profile/body.php

If you name the file .blade.php, you only have Blade directives and functions but can't access the Aimeos view helpers using e.g. "$this->link()"
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply