Sign In  |  Register
 
 DotNetNuke Powered!
DotNetNuke Support Forums

Shared Images - Modules, Skins, Containers

Rate this topic:

Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.

AuthorMessages
John Mitchell
Posts:3352



03/02/2007 2:38 PM  

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"

Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.

Forums >DotNetNuke Support >Tips-And-Tricks > Shared Images - Modules, Skins, Containers



ActiveForums 3.7
Visit our Store for great DotNetNuke Modules and Skins
DNNMasters Sitemap/Google Sitemap 3.0

Item codeSM3-01
Price$29.00
Product Information 
DotNetNuke CSS NavMenu 3.3 (Developers)

Item codeCSSNM33DEV
Base Price$149.00
Product Information 
Snapsis PageBlaster 3.3.2 for DotNetNuke - Professional Edition

AuthorJohn Mitchell
Base Price$79.00
Product Information 
XDAkuna (Web 2.0 CSS XHTML Skin)

Item codeXDAkuna
AuthorNina Meiers
Price$49.00
Product Information