Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Overview

Excerpt

Icons are used throughout the webtop to provide visual cues for different content types and administrative tasks. Developers can add their own icon sets or reuse the ones that exist within the framework by default.

FarCry icons are loaded via a URL call to a simple facade that dynamically determines where to grab the icon source.

Code Block

<img src="http://my.farcry.site/webtop/facade/icon.cfm?icon=myComponent.png&size=48&usecustom=true" />

The icon.cfm facade will work out the most suitable icon that matches the criteria nominated in the URL parameters of the call. Essentially it just delivers the icon via a CFCONTENT call. We do this so we don't have to have the icon listed under the webroot of your project which can be very useful when you have a plugin that has no webroot for example.

Tip

there There is a custom tag for this in.that simplifies calling icons: ./core/tags/admin/icon.cfm

Farcry looks in the following directories for icons:

  • <project>/www/wsimages/icons (this is where custom icons should go for projects)

...

  • <plugin>/www/

...

  • wsimages/icons (

...

  • this is where custom icons should go for plugins)

...

  • <project/www/

...

  • images/icons (do not use this; for backward compatibility only)

...

  • <project>/www/<plugin>/wsimages/icons (

...

  • do not use this; for backward compatibility only)
  • <core>/webtop/icons (don't put custom icons here; its just for the core framework)

It The framework loops through all plugins in reverse order (its the standard cascade order for plugin execution.. ie. the last plugin called in your list is dominant). It will stop looking once it has found an icon that matches.

Info

If no icon is found, FarCry uses a generic icon (based on the framework logo) instead.

Within the icon directory are folders named by the icon size
eg /iconthere is a folder for each icon size. You will need to place a copy of your icon at each of the relevant sizes into the relevant folder.

For example:

Code Block

 /icons/16/myComponent.png
 /icons/32/myComponent.png
 /icons/48/myComponent.png

...


 /

...

icons/64/myComponent.png
 /icons/128/myComponent.png
Tip

you need Its a good idea to provide an icon for every size. different Different areas of farcry the FarCry admin leverage different sized icons.