The following is a method for sharing images between Skins, Containers, and Modules. When you package your module use a parent folder that all your modules get installed into, and inside that folder have an /images folder that all your modules, skins, containers, etc. can reference. I name this parent folder with my company name, so under /DesktopModules/Snapsis/Images I will have all the shared images. If I install create another module it will be installed in the same company folder so then I might have /DesktopModules/Snapsis/PageBlaster. From the folder of the PageBlaster module the relative path to my shared images folder would be src="<%=ModulePath%>../images/shared-image.gif" For Skins, the folder path is either /Portals/_default/[Skins or Containers] or /Portals/nn/[Skins or Containers] (where nn is portal number) which means they are at the same "depth" so I can find the find the shared images folder from the skin by going back three folders like so: From any Skin the the relative path to my shared images folder would be src="<%=SkinPath%>../../../DesktopModules/Snapsis/Images/shared-image.gif" In a .css file from the Skin or Container you are automatically referencing from the physical location of the css file so you would just need something like:
background-url:(../../../DesktopModules/Snapsis/Images/shared-image.gif); Or if you are not running in a virtual folder you could also just always reference from the root of your website with src="/DesktopModules/Snapsis/Images/shared-image.gif" |