I am trying to create a widget called SiteAlert that appears on pages with a message. I want to be able to select see and edit the widget directly from the admin menu.
Basically admin users should be able to select SiteAlert from menu, enter an alert and this will appear wherever widget is used on site.
Currently the widget works if used like a traditional widget i.e through widget in admin menu and attaching to section. i also used AdminMenu.cs to set SiteAlert to appear in admin menu but its not saving the message when its entered. I can see its accepting the value (using break points) but not storing it.
Does anyone know of or have a simple example of something like this or similar? ive been looking at similar issues on Orchard codeplex site and the adminblog module but so far haven’t been able to resolve my issue
It would be impossible to answer this question with that amount of specific details. Luckily, I’ve seen your code on the discussions on CodePlex when you cross-posted this, and you were lacking any sort of persistence code, which would explain why it’s not persisted. All you have to do is retrieve the object that you want to modify from the content manager, and modify it. That’s it, and it will be persisted for you.