NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: terryd on August 28, 2013, 12:36:33 AM
-
On my Webserver procedure window I have created a settings sheet where I set the default Theme and Email settings. I write these away to an xml file and read them on startup in the Webserver init embed point.
With the themes I have set a global value in the Nettalk object Settings\Styles\Files Theme field.
I have given certain users access to the RuntimeSettings NetWebForm. Using this they can try the different themes select one they like, set in in the setting sheet and on reboot they have that theme.
I would like to do the same with Menu positions.
I have created a global variable MenuPosition. I read the xml file in the Webserver init embed.
What is the best place (if possible) to set the menu based on the MenuPosition Global Variable. I see on the header extension advanced tab there is a runtime setting word '_menu_' where I could substitute the MenuPosition variable but I didn't try to fiddle with this in case it had unexpected consequences.
-
Hi Terry, I allow users to set pick the theme from a drop list on a settings form. When they log in I set the Theme. I decided not to allow them to change the menu but I think the code would work.
p_web.SetValue('_theme_',L:Theme)
p_web.ChangeTheme()
p_web.SetValue('_menu_',L:MenuType)
!p_web.ChangeMenu()
-
Hi Kevin
Thanks for the reply.
Looking at my situation I don't really want the user who logs into the system to change the position, I want to allow the web administrator to use the runtime settings to decide on a theme and menu position that will suit the company since it represents the company to the outside world.
The particular package I want to apply this to is very generic and this would allow the customer to customise without me having to code changes.
-
you could add code in the header procedure to set loc:MenuPos and loc:MenuStyle to whatever you've allowed the user to set it to.
cheers
Bruce