1

I am very sorry to have to do a post like this, but I have been looking everywhere and I have not found a good example of how to use/reference quick settings on a SPA module for DNN 9. IS there anyway that someone could point me to some sample code or give an example of how you can save/reference a modules quick settings.

VDWWD
  • 35,079
  • 22
  • 62
  • 79
John Kane
  • 4,383
  • 1
  • 24
  • 42

1 Answers1

1

My Restaurant Menu example module has a SPA version that with a full, working implementation of the Quick Settings.

Edit: In my above example, I just access the setting in the controller webAPI method for the view. If you would like to spit out the setting as a SPA token in your view html, you use [ModuleContext:{SettingName}].

In my above example, I am setting the module setting in with the following code:

ModuleController.Instance.UpdateModuleSetting(ActiveModule.ModuleID, "RestaurantMenu_CurrencyCulture", settings.CurrencyCulture);

The second parameter is the setting's dictionary key name. Therefore, to get this setting value in the View.html, I would use the following SPA token: `

[ModuleContext:RestaurantMenu_CurrencyCulture]
Fix It Scotty
  • 2,852
  • 11
  • 12
  • Thank you, how do you access the settings in the html files? this link: http://www.dnnsoftware.com/docs/developers/about-modules/spa-module-development.html seems to suggest that you can access it like you would a module context property – John Kane Jun 05 '18 at 13:12
  • Added more detail to my answer. Hope this helps. – Fix It Scotty Jun 05 '18 at 14:53