changes in jqadm templates not affect

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!
mojanimator
Posts: 2
Joined: 13 Oct 2022, 17:49

changes in jqadm templates not affect

Post by mojanimator » 13 Oct 2022, 18:03

hi
i followed the instructions for creating extension. i have copied client html sections in my extensions and changes works perfect.
but about jqadm section:
i copied from vendor/ai-admin-jqadm/templates/admin/jqadm
to
packages/[my theme name]/templates/admin/jqadm

but changes in files (for example page.php) not affect at all,
i cleared cache with aimeos:clear but not any success

am i doing somethings wrong?
Image

the only solution i have found was comment my theme name in manifest . but i dont think this is the true way
Image

User avatar
VirtualSpy
Advanced
Posts: 122
Joined: 05 Jul 2022, 07:55

Re: changes in jqadm templates not affect

Post by VirtualSpy » 14 Oct 2022, 06:25

mojanimator wrote: 13 Oct 2022, 18:03 hi
i followed the instructions for creating extension. i have copied client html sections in my extensions and changes works perfect.
but about jqadm section:
i copied from vendor/ai-admin-jqadm/templates/admin/jqadm
to
packages/[my theme name]/templates/admin/jqadm

but changes in files (for example page.php) not affect at all,
i cleared cache with aimeos:clear but not any success

am i doing somethings wrong?
Image

the only solution i have found was comment my theme name in manifest . but i dont think this is the true way
Image
did yo run cmd

Code: Select all

composer up

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

Re: changes in jqadm templates not affect

Post by aimeos » 14 Oct 2022, 07:59

mojanimator wrote: 13 Oct 2022, 18:03 the only solution i have found was comment my theme name in manifest . but i dont think this is the true way
You've created a Laravel theme extension and there, the theme files are only used if you select the theme for the current site in the frontend. For the admin backend, separate themes are not supported yet and the "admin/jqadm/templates" key must be outside the section of your theme template configuration in the manifest.php, i.e.:

Code: Select all

	'template' => [
		'admin/jqadm/templates' => [
			'templates/admin/jqadm',
		],
		'admin/jsonadm/templates' => [
			'templates/admin/jsonadm',
		],
		'client/jsonapi/templates' => [
			'templates/client/jsonapi',
		],
		'my-aimeos-ext' => [
			'client/html/templates' => [
				'templates/client/html',
			],
			'controller/jobs/templates' => [
				'templates/controller/jobs',
			],
		],
	],
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

mojanimator
Posts: 2
Joined: 13 Oct 2022, 17:49

Re: changes in jqadm templates not affect

Post by mojanimator » 14 Oct 2022, 12:10

aimeos wrote: 14 Oct 2022, 07:59
mojanimator wrote: 13 Oct 2022, 18:03 the only solution i have found was comment my theme name in manifest . but i dont think this is the true way
You've created a Laravel theme extension and there, the theme files are only used if you select the theme for the current site in the frontend. For the admin backend, separate themes are not supported yet and the "admin/jqadm/templates" key must be outside the section of your theme template configuration in the manifest.php, i.e.:

Code: Select all

	'template' => [
		'admin/jqadm/templates' => [
			'templates/admin/jqadm',
		],
		'admin/jsonadm/templates' => [
			'templates/admin/jsonadm',
		],
		'client/jsonapi/templates' => [
			'templates/client/jsonapi',
		],
		'my-aimeos-ext' => [
			'client/html/templates' => [
				'templates/client/html',
			],
			'controller/jobs/templates' => [
				'templates/controller/jobs',
			],
		],
	],
yes. i changed site theme in frontend admin panel and made manifest changes . i made changes in packages/[my theme]/views/page/index.blade.php but not any changes affected. but changes in packages/[my theme]/views/base.blade.php affects perfectly . i dont know the reason

my extension manifest:

Image

packages/[my theme]/views/page/index.blade.php (any changes not affect)

Image

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

Re: changes in jqadm templates not affect

Post by aimeos » 15 Oct 2022, 14:24

Maybe a few things to check:
- Views could be cached (run: php artisan optimize:clear)
- The page/index view could be overwritten in ./resources/views/vendor/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

nowrap
Posts: 37
Joined: 01 Mar 2023, 23:03

Re: changes in jqadm templates not affect

Post by nowrap » 05 Aug 2023, 11:40

Hello,
i am facing a similar problem with aimeos 2022.x and a custom laravel theme.

A change to the "<custom-theme>/views/jqadm/index.blade.php" file is not rendered in the admin area.

I run the "php artisan optimize:clear" and the directory "storage/framework/views" is empty afterwards.
In "./resources/views/vendor/" is nothing regarding jqadm or admin.

Reloading the admin dashboard creates a new file in "storage/framework/views".
The last contains a origin path: /vendor/aimeos/aimeos-laravel/src/views/jqadm/index.blade.php

So i guess the themes "jqadm/index.blade.php" isn't used. The custom.js und custom.css for example are included in the admin sourcecode.

Maybe i am missing something?

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

Re: changes in jqadm templates not affect

Post by aimeos » 06 Aug 2023, 17:26

Overwriting Blade templates in a theme extension isn't supported (backend doesn't support themes in that way) and you have to put your overwritten Blade template to ./Resources/views/shop/jqadm/ instead.

See: https://aimeos.org/docs/latest/laravel/ ... -templates
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

nowrap
Posts: 37
Joined: 01 Mar 2023, 23:03

Re: changes in jqadm templates not affect

Post by nowrap » 11 Aug 2023, 14:20

Thx for the reply.

We solved this by using custom.js and custom.css plus an own api controller for getting the needed data for the javascript.
So the template isn't needed to be overridden.

Post Reply