How to change the main icon?


#1

How do I change the icon of the application?

I tried:

$app = new \atk4\ui\App('MyApp', ['icon'=>'user']);

or

$app = new \atk4\ui\App('MyApp', ['icon'=>'https://fsfsdfsdfsdfsd.ico']);

But in both cases it defaults the Agile Toolkit icon.


Admin Layout Logo
#2

Hi,

When you initialize layout, its template has 2 Spot:

  • {Header}
  • {Content}

By default, when you add stuff into layout, it appears inside ‘Content’, but you can explicitly specify a different Spot.

$app->layout->add('LoremIpsum');
$app->layout->add([
  'Header',                  // Name of the component
  'Header with icon',        // text to put on it
  'icon'=>'settings',        // icon to use
  'subHeader'=>'and with sub-header'
], 'Header');                // Spot to use instead of Content.

Let me know if it works for you. Alternatively, you can also define your own Layout template.


#3

Hi,

Thanks.
How do I put a custom image?
I tried:

‘icon’=>‘https://img.clipartfest.com/dbb6eaa5db5f048ef571f5f57f7c4b53_-mobile-phone-icon-icon-mobile-cell-phone-icon-clipart_512-411.png’,

but it does not work. I get no image.


#4

If you are specifying an image, you should use:

['image'=>$url]