Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Custom ActionIconCustom ActionIcon
Previous
 
Next
New Post
10/7/2008 11:21 AM
 

Hello,

I am creating a module with an action that requires an icon outside of the dnn standard set.  Unfortuantely I am having trouble referencing it when I create the action.

 

It currently resides in [DesktopModules]/ModuleName/images.  Currently I am referencing it with ~/Desktopmodules/ModuleName/images/filename.  This only works for the footer of the module and the menu just displays the alternate text.

I cannot seem to find a path which works for both the menu and the action icons in the footer.

 

Any assistance would be appreciated,

 

Steve

 
New Post
10/7/2008 1:59 PM
 

This is what I used the last time for the icon string:

Me.ModulePath & "images/icon_prayer_16px.gif"

The icon icon_prayer_16px.gif was in the folder /DesktopModules/ModuleName/images.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
10/7/2008 3:16 PM
 

William,

 

I tried the path you suggested, and opposite to the other case I presented, I now see an icon in the pop-up menu (SOLPART) but get alternate text on the action button.

ActionButton ImagePath becomes "VIRTUALDIRECTORY/images/VIRTUALDIRECTORY/DesktopModules/MODULENAME/images/IMAGENAME.png

Where as the ImagePath in the pop-up menu is now correctly "VIRTUALDIRECTORY/DesktopModules/MODULENAME/images/IMAGENAME.png"

Any other ideas?

-------------

 Dim mAction As New Entities.Modules.Actions.ModuleAction(GetNextActionID, _
                                        "Resend", _
                                        Entities.Modules.Actions.ModuleActionType.AddContent, _
                                        _companyID, _
                                        ModulePath & "images/mail_icon.png", _
                                        EditUrl("CompanyID", _companyID, "Resend"), _
                                        "", _
                                        False, _
                                        Security.SecurityAccessLevel.View, _
                                        True, _
                                        False)

-------------

Steve

 
New Post
10/7/2008 5:59 PM
 

When I use the code you suggested, what I believe would be the desired way to get determine the image path, the result in the actionbutton is incorrect.  Upon further inspection of the DNN source I found the following code snippet....

[Starts on line 240 of ActionButton.vb]

If action.Icon.IndexOf("/") > 0 Then
    ModuleActionIcon.ImageUrl = action.Icon
Else
    ModuleActionIcon.ImageUrl = "~/images/" & action.Icon
End If

This particular code snippet is an issue because ModulePath = "/VIRTUALDIRECTORY/DesktopModules/MODULENAME/" where the indexof("/") is Zero.  I would consider this a bug in DotNetNuke.

Does anyone have any ideas, or comments?  Should I modify and recompile the library in question?

 

In my opinion the If should read as ">=" and not simply ">".

 

Thanks,

Steve

 
New Post
10/7/2008 6:14 PM
 

Hi Stephen,

This does appear to be a bug; there is no way to reference a relative uri outside of the images directory.  I'd ask that you log this as a bug in Gemini, at http://support.dotnetnuke.com.

As a workaround, have you considered embedding the image directly in your assembly?  This way you would have an absolute uri to work with.

Brandon


Brandon Haynes
BrandonHaynes.org
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Custom ActionIconCustom ActionIcon


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out