HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 1.1ASP.Net 1.1Any way to have a second AddContent.Action in a LocalResource file?Any way to have a second AddContent.Action in a LocalResource file?
Previous
 
Next
New Post
3/3/2006 2:07 PM
 
I have added more than one action to the module and on the bottom (or module drop down), they both dispaly the same name since I used Localization and in my .resx file I can only add one AddContent.Action. I would like to use Localization and not hardcode it. Any help would be appreciated. This is the code:(this is of course with Actions declared)
"Actions.Add(GetNextActionID, Localization.GetString(Entities.Modules.ModuleActionType.AddContent, LocalResourceFile), Entities.Modules.Actions.ModuleActionType.AddContent, "", "", EditUrl("one"), False, Security.SecurityAccessLevel.Edit, True, false)
Actions.Add(GetNextActionID, Localization.GetString(Entities.Modules.ModuleActionType.AddContent, LocalResourceFile), Entities.Modules.Actions.ModuleActionType.AddContent, "", "", EditUrl("two"), False, Security.SecurityAccessLevel.Edit, True, false)"
How can I assign the AddContent.Action in the .resx file to grab a second value for the second action?
Again, TIS,

Noorbakhsh
 
New Post
3/4/2006 11:26 AM
 
Hi,
It's absolutely no problem to add a second action to the module menu, even with localized text. The key to success here is the second parameter of the Action.Add call:
Actions.Add(GetNextActionID, Localization.GetString(Entities.Modules.Actions.ModuleActionType.AddContent, LocalResourceFile), Entities.Modules.Actions.ModuleActionType.AddContent, "", "", EditUrl(), False, Security.SecurityAccessLevel.Edit, True, False)
This call actually makes DNN look into the resourcefile specified in "LocalResourceFile" for the key "AddContent.text" and return the result.
If you change this parameter to
Localization.GetString("MyMenuItem", LocalResourceFile)
And add a Key "MyMenuItem.Text" to your resourcefile, things should be fine.

Hope this helps.

Greetz,
Stefan Kamphuis
 
New Post
3/4/2006 12:39 PM
 
Very much appreciated SuperSKa,
Noorbakhsh
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 1.1ASP.Net 1.1Any way to have a second AddContent.Action in a LocalResource file?Any way to have a second AddContent.Action in a LocalResource file?


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.

Attend A Webinar
Free Demo Site
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me
Have Someone Contact Me
DotNetNuke Store

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

DotNetNuke DNN Hosting
Exact Target Exec Alert
r2integrated

DotNetNuke Scoop!

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates the DotNetNuke Store where users purchase third party apps for the platform.