How to change the main icon?


How do I change the icon of the application?

I tried:

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


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

But in both cases it defaults the Agile Toolkit icon.



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.

  '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.



How do I put a custom image?
I tried:


but it does not work. I get no image.


If you are specifying an image, you should use: