Changing title in jqadm to be dynamic

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!
jafo66
Posts: 26
Joined: 06 Mar 2024, 04:42

Changing title in jqadm to be dynamic

Post by jafo66 » 16 Apr 2024, 17:11

I was able to get my own version of the index.blade.php for the admin screen working based on another post. I was hoping to have the title generated based on the site label. How would I get that in the index.blade.php? I tried using the app() and app('aimeos-context') but neither seemed to return the actual label (not the word "default", but the label for the site: "My Site")

Thanks!

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

Re: Changing title in jqadm to be dynamic

Post by aimeos » 17 Apr 2024, 08:17

Try this code:

Code: Select all

app( 'aimeos.context' )->get( false )->locale()?->getSiteItem()?->getLabel() ?: 'Aimeos admin interface'
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

jafo66
Posts: 26
Joined: 06 Mar 2024, 04:42

Re: Changing title in jqadm to be dynamic

Post by jafo66 » 17 Apr 2024, 12:40

Yep, that worked great. I missed the get(false) when I was trying to do it myself.

Post Reply