Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Affordable ASP.NET Hosting Service
  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  how to get module path?
Previous Previous
 
Next Next
New Post 10/26/2007 4:42 AM
User is offline onishiro
143 posts
9th Ranked


how to get module path? 

how can I get the path the desktopModules/MyModule path from the module itself?

I need the path because I have some images on my module, and I need to make the links relative

Thanks in advance.

 
New Post 10/26/2007 10:37 AM
User is offline Fooberichu
467 posts
www.seeleyware.com
8th Ranked


Re: how to get module path? 

If you make the assumption that you know the folder name for the module and somebody isn't going to change it, you could use a relative url (assuming it is an ASP.NET image control -- something like image.ImageUrl = "~/DesktopModules/MODULEFOLDER/images/expand_blue.jpg")

I use the same technique on several modules.  Additionally, depending on which class you inherit from on your modules (I typically use UserModuleBase, uncertain on which class it is defined) you can use ResolveUrl("~/DesktopModules/MODULEFOLDER/images/expand_blue.jpg") to convert it to a path usable by other things.  Basically the same thing the ASP.NET image control does in the background anyway.


-- Fooberichu
http://www.seeleyware.com
 
New Post 10/26/2007 12:34 PM
User is offline William Severance
842 posts
www.wesnetdesigns.com
7th Ranked






Re: how to get module path? 

You module will inherit from PortalModuleBase which exposes the public property ModulePath.  ModulePath will return the path to the module folder starting from the root folder with beginning and ending forward slashes. For example: "/public_html/DesktopModules/MyModuleFolder/"


Bill, WESNet Designs
 
New Post 10/26/2007 2:18 PM
User is offline Mitch Sellers
5712 posts
www.mitchelsellers.com
3rd Ranked




Re: how to get module path? 

Bill's recommendation is the way that I do it for my modules.  (now...)


-Mitchel Sellers
MCITP, MCPD, MCTS
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Consulting Quotes, and DNN Technical Support Services

I reccomend 3Essentials for shared hosting and BaseCamp for project management
 
New Post 10/29/2007 3:11 AM
User is offline onishiro
143 posts
9th Ranked


Re: how to get module path? 

 imagemaker wrote

You module will inherit from PortalModuleBase which exposes the public property ModulePath.  ModulePath will return the path to the module folder starting from the root folder with beginning and ending forward slashes. For example: "/public_html/DesktopModules/MyModuleFolder/"

Thanks, works like a charm :)

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  how to get module path?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Cygnusoft Custom Software
Cygnusoft has been providing cutting-edge custom software solutions for 20 years. Cygnusoft is also a leading start-up incubator, helping our partners build successful new businesses.
www.cygnusoft.com
Digicon: DotNetNuke design and development
Digicon is based in Brisbane, Queensland, Australia
digicon.com.au
Live Visitor Tracking & Live Chat For DotNetNuke
Track your visitors in real time and add live chat for sales & support. Free Trial.
www.whoson.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP