How to organize work with the frontend?

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
АндрейЖидилин
Posts: 10
Joined: 27 Apr 2022, 10:00

How to organize work with the frontend?

Post by АндрейЖидилин » 29 Apr 2022, 11:43

Hello.
I can not understand how to create a theme and how to work with it?
I created the extension as described in the documentation https://aimeos.org/docs/latest/developer/extensions/

Next, I need a copy of css and ys to be placed in the directory /packages/<my-extension>/themes/client/html/<my-theme>/...

And run composer up

Where can I get these files css and js?

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

Re: How to organize work with the frontend?

Post by aimeos » 29 Apr 2022, 12:14

Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
АндрейЖидилин
Posts: 10
Joined: 27 Apr 2022, 10:00

Re: How to organize work with the frontend?

Post by АндрейЖидилин » 29 Apr 2022, 12:38

I copied and run composer up
But in the setting I do not see my theme
I see only Default
What else needs to be done to make the topic appear in the list?
1651235882880.jpg
1651235882880.jpg (25.08 KiB) Viewed 1519 times

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

Re: How to organize work with the frontend?

Post by aimeos » 29 Apr 2022, 12:50

Did you create a Laravel theme extension here (not a standard Aimeos extension)?
https://aimeos.org/extensions
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
АндрейЖидилин
Posts: 10
Joined: 27 Apr 2022, 10:00

Re: How to organize work with the frontend?

Post by АндрейЖидилин » 29 Apr 2022, 13:52

aimeos wrote: 29 Apr 2022, 12:50 Did you create a Laravel theme extension here (not a standard Aimeos extension)?
https://aimeos.org/extensions
Yes, I created an extension and installed via composer
Screen: http://joxi.ru/Q2KdXRjCOGGwRA

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

Re: How to organize work with the frontend?

Post by aimeos » 29 Apr 2022, 14:42

The ./config/client.php file of the generated extension misses a configuration:

Code: Select all

<?php
return [
	'html' => [
		'themes' => [
			'<extensionname>' => '<extensionname>',
		],
	],
	'jsonapi' => [
	],
];
Please add that to your ./config/client.php file in your extension and replace <extensionname> with the name of your extension.

This is now also fixed in the extension generator so new Laravel theme extensions will contain the necessary code
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
АндрейЖидилин
Posts: 10
Joined: 27 Apr 2022, 10:00

Re: How to organize work with the frontend?

Post by АндрейЖидилин » 29 Apr 2022, 15:05

thanks It works

User avatar
АндрейЖидилин
Posts: 10
Joined: 27 Apr 2022, 10:00

Re: How to organize work with the frontend?

Post by АндрейЖидилин » 29 Apr 2022, 15:38

Tell me what is the difference between

Code: Select all

composer req aimeos-themes/<my-theme>
and

Code: Select all

composer req aimeos-extensions/<my-theme>   
And what is the right command to use?

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

Re: How to organize work with the frontend?

Post by aimeos » 29 Apr 2022, 15:47

АндрейЖидилин wrote: 29 Apr 2022, 15:38

Code: Select all

composer req aimeos-extensions/<my-theme>   
This one is correct for 2022.x versions, the documentation for 2022 isn't published yet but will be soon.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
АндрейЖидилин
Posts: 10
Joined: 27 Apr 2022, 10:00

Re: How to organize work with the frontend?

Post by АндрейЖидилин » 30 Apr 2022, 06:18

Okay, I installed the extension, but when I change

Code: Select all

/packages/<my-extenshion>/views/base.blade.php
Nothing happens. Changes only when the file is changed

Code: Select all

/vendor/aimeos/aimeos-laravel/src/views/base.blade.php
How can I change something without affecting the vendor's code?

Post Reply