I'm adding a new tray icon for the Commerce for Umbraco admin section and have done it by adding an image to the .../umbraco/images/tray/... folder and adding a line to the umbracoGui.css like this:
Is this the best way? Also, a related question around adding these mods at package install time - is this supported by Package Actions or via the Package Action Extensions?
[quote]
Any reason why you resort to CSS as the appIcon field should just work with 'commerce.png' if you put it in the image in umbraco/images/tray folder?[/quote]
I don't believe this is the case with v4...looks like the DB field appIcon actually maps to an element CSS Class and not to an img or background.
I'll verify, but this is what it looks like today.
You can use both, both image paths and classes work, for deployment the easiest thing to do is a imagepath.
Also note there is a package action to install sections and their icons with
Further to Per's clarification above, you can indeed create an Admin Section Icon either by:
1 - placing the icon (PNG) in the ../umbraco/images/tray/... folder and setting the appIcon field in the umbracoApp table to the image name (this is also the way that the Package Action will create the entry for you if you install the Admin Section via the Package Installer's built-in Package Actions)
2 - placing the icon (PNG) in a directory of your choice (though .../tray/... is the convention) and adding a style in .../umbraco/css/umbracoGui.css similar to:
[code]#tray .trayyouricon{
background-image:url('../images/tray/youricon.png');
}[/code]
then setting the appIcon field in the umbracoApp table to the style name.
Adding Custom Tray Icon
I'm adding a new tray icon for the Commerce for Umbraco admin section and have done it by adding an image to the .../umbraco/images/tray/... folder and adding a line to the umbracoGui.css like this:
[code]/* commerce for umbraco tray icon */
tray .traycommerce
{
background-image:url('../images/tray/commerce.png');
}[/code]
Is this the best way? Also, a related question around adding these mods at package install time - is this supported by Package Actions or via the Package Action Extensions?
Thanks,
-Paul
Paul,
I'm sure it's just in the DB. umbracoApp I believe it's the appIcon field.
I'm just downloading the latest source for Commerce4 Umbraco. What client do you use on codeplex BTW?
Thanks
Matt
Matt -
Yes, good point - I neglected to mention that I have a record in the umbracoApp table like this:
[code]...
appName = Commerce
appIcon = .traycommerce
...[/code]
The tray icon renders properly with this approach, just wondering if this is the 'best' way.
I use SVN (Tortoise SVN) on Windows 7 (a few commands [clean-up] don't work on Win 7 though).
-Paul
Any reason why you resort to CSS as the appIcon field should just work with 'commerce.png' if you put it in the image in umbraco/images/tray folder?
You can then add this in the package by running a simple SQL script.
Off topic but I've been playing with anksvn. It's not getting great reports.... anyone use it much?
Matt -
[quote]
Any reason why you resort to CSS as the appIcon field should just work with 'commerce.png' if you put it in the image in umbraco/images/tray folder?[/quote]
I don't believe this is the case with v4...looks like the DB field appIcon actually maps to an element CSS Class and not to an img or background.
I'll verify, but this is what it looks like today.
-Paul
You can use both, both image paths and classes work, for deployment the easiest thing to do is a imagepath.
Also note there is a package action to install sections and their icons with
Per -
Nice! Thanks for the clarification.
Is there anything Umbraco can't do?
-Paul
Further to Per's clarification above, you can indeed create an Admin Section Icon either by:
1 - placing the icon (PNG) in the ../umbraco/images/tray/... folder and setting the appIcon field in the umbracoApp table to the image name (this is also the way that the Package Action will create the entry for you if you install the Admin Section via the Package Installer's built-in Package Actions)
2 - placing the icon (PNG) in a directory of your choice (though .../tray/... is the convention) and adding a style in .../umbraco/css/umbracoGui.css similar to:
[code]#tray .trayyouricon{
background-image:url('../images/tray/youricon.png');
}[/code]
then setting the appIcon field in the umbracoApp table to the style name.
-Paul
is working on a reply...