Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Paul Sterling 718 posts 1534 karma points MVP 9x admin c-trib
    Apr 14, 2009 @ 22:36
    Paul Sterling
    0

    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

  • dillorscroft 198 posts 192 karma points
    Apr 14, 2009 @ 22:48
    dillorscroft
    0

    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

  • Paul Sterling 718 posts 1534 karma points MVP 9x admin c-trib
    Apr 14, 2009 @ 22:54
    Paul Sterling
    0

    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

  • dillorscroft 198 posts 192 karma points
    Apr 14, 2009 @ 22:58
    dillorscroft
    0

    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.

  • dillorscroft 198 posts 192 karma points
    Apr 14, 2009 @ 22:59
    dillorscroft
    0

    Off topic but I've been playing with anksvn. It's not getting great reports.... anyone use it much?

  • Paul Sterling 718 posts 1534 karma points MVP 9x admin c-trib
    Apr 15, 2009 @ 01:23
    Paul Sterling
    0

    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

  • Per Ploug 865 posts 3491 karma points MVP admin
    Apr 15, 2009 @ 08:33
    Per Ploug
    0

    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

  • Paul Sterling 718 posts 1534 karma points MVP 9x admin c-trib
    Apr 15, 2009 @ 19:35
    Paul Sterling
    0

    Per -

    Nice! Thanks for the clarification.

    Is there anything Umbraco can't do?

    -Paul

  • Paul Sterling 718 posts 1534 karma points MVP 9x admin c-trib
    Apr 16, 2009 @ 01:30
    Paul Sterling
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft