+ Post New Thread
Results 1 to 10 of 10
Home Access Plus+ Thread, Custom tiles - icons in Projects:; I'm probably being a numpty here (not helped by the fact that I have a cold and therefore my brain ...
  1. #1
    FishCustard's Avatar
    Join Date
    Feb 2013
    Location
    Croydon
    Posts
    420
    Thank Post
    72
    Thanked 40 Times in 36 Posts
    Rep Power
    17

    Custom tiles - icons

    I'm probably being a numpty here (not helped by the fact that I have a cold and therefore my brain feels like a 486 trying to run Windows 8), but I can't seem to figure out how I can set an icon for a custom tile.

    The icons all seem to be loaded from an /api/... URL - do I need to add my icons to a config file so that they're served up via the API? When I try putting an absolute URI into the HAP crashes as it's expecting a virtual path in that attribute.

  2. #2
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,483
    Thank Post
    37
    Thanked 490 Times in 422 Posts
    Rep Power
    110
    Save the image in the images folder, and use ~/images/image.png. The system then processes that image looks for what colour it is, and does some resizing, which is why it references /api/

  3. #3
    FishCustard's Avatar
    Join Date
    Feb 2013
    Location
    Croydon
    Posts
    420
    Thank Post
    72
    Thanked 40 Times in 36 Posts
    Rep Power
    17
    I've done that (PNG image directly in the image folder, referenced as ~/images/imagename.png) but I just get a blank image in the tile.

    Any ideas?

    Thanks.

  4. #4
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,483
    Thank Post
    37
    Thanked 490 Times in 422 Posts
    Rep Power
    110
    None, that should work, can you check the hapConfig.xml has the correct path ~/images/imagename.png

  5. #5
    FishCustard's Avatar
    Join Date
    Feb 2013
    Location
    Croydon
    Posts
    420
    Thank Post
    72
    Thanked 40 Times in 36 Posts
    Rep Power
    17
    Yep, the XML tag is:

    Code:
    <Link name="Name Here" showto="Inherit" description="" url="/path/to/resource.html" icon="~/images/imagename.png" target="1" width="1" height="" />
    No dashes, underscores or other oddities in the image name either.

    Is there a way to point it to an absolute image path as a backup?

  6. #6
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,483
    Thank Post
    37
    Thanked 490 Times in 422 Posts
    Rep Power
    110
    Ok, that's odd, can you try going to /hap/api/tiles/icons/64/64/images/imagename.png

  7. #7
    FishCustard's Avatar
    Join Date
    Feb 2013
    Location
    Croydon
    Posts
    420
    Thank Post
    72
    Thanked 40 Times in 36 Posts
    Rep Power
    17
    I get a blank image (no ASP.NET error, but just an image file with nothing in) - is there a specific format the images have to be in? The original is the same size as the in-built tiles.

  8. #8
    FishCustard's Avatar
    Join Date
    Feb 2013
    Location
    Croydon
    Posts
    420
    Thank Post
    72
    Thanked 40 Times in 36 Posts
    Rep Power
    17
    Does HAP cache these images at all? If so can the cache be cleared? In the course of testing I tried editing an existing image and the changes didn't seem to show up...!

  9. #9
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,483
    Thank Post
    37
    Thanked 490 Times in 422 Posts
    Rep Power
    110
    Yes hap does cache them, delete the contents of the icons folder in app_Data

  10. Thanks to nickbro from:

    FishCustard (18th March 2014)

  11. #10
    FishCustard's Avatar
    Join Date
    Feb 2013
    Location
    Croydon
    Posts
    420
    Thank Post
    72
    Thanked 40 Times in 36 Posts
    Rep Power
    17
    Aha! Fixed, thank you!

    I feel rather silly for not noticing a folder called 'iconcache' before now...

SHARE:
+ Post New Thread

Similar Threads

  1. Custom Homepage Tiles
    By MrJDH in forum Home Access Plus+
    Replies: 4
    Last Post: 23rd May 2013, 03:08 PM
  2. Custom Icons Causing Errors
    By britzj in forum Home Access Plus+
    Replies: 3
    Last Post: 20th April 2013, 04:41 PM
  3. Not tried this yet, custom tile tool Oblytile
    By caffrey in forum Windows 8
    Replies: 0
    Last Post: 20th November 2012, 01:30 PM
  4. Using custom icons on network
    By Little-Miss in forum Learning Network Manager
    Replies: 22
    Last Post: 25th August 2009, 11:28 PM
  5. Replies: 1
    Last Post: 15th August 2005, 06:44 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •