New section, where to store/retrieve configuration values?
I have successfully created my own section, to manage question entered in the frontend. The sections main folder has 3 pages: configuration, and 2 others.
By using the configuration, someone like and admin (or the section owner) should be able to set the # of days after which a question should be "archived". My question here is: how/where is it best practice to store a default value for a configuration value like this, and where to store the value that the user (admin) enters when changing it (in my own control)? Do we use the umbraco DB for this, some other way?
Hi, in 7 days I did not a single reply to my question. It makes me wonder, is this not an active forum, or is my question so stupid that no one bothers to answer it?
Well, I guess you've actually suffered from the forum being so active that so many post has been made that no one ever saw your post :-) That's a pitty though, since it's a good question.
I'm not sure about what it is you're asking...
The config stuff is it a node you have setup in Umbraco? Because then that really should be all you need, right? Since the value entered in these fields is already saved in the Umbraco DB.
Then it's a matter of accessing it using the API, which you can find some more information about in the WIKI if you have not done so already.
Thanks Jan! This is what I was looking for. I just thought that, besides creating a document type and using it to define the config values, that since a section should be self-contained/modular, you would do this in some other way...
Well you could make another root node in the content tree called "Settings" and then have a document type for the settings there so it does not clutter up the content structure/document types if it's general settings. If the settings are individual for each node then it makes sense to have "settings" tab on the document type.
Imo, stack overflows umbraco tag is way more active than the umbraco forums.
I've kind of adopted the mindset to use stackoverflow for all technical questions, there is a tag for everything and people work hard on their stack rep now days.
Especially since stack CV went live and your stack profile can be used on their job services to find a job or employees.
It would be really cool if Umbracos Forum support the Stack Exchange OAuth API and made it so if you ask a question here it also shows up on Stack under the Umbraco tag or something like that.
As im not yet familiar enough with peta poco the orm of choice for storing data im using entity framework. But the point is one of the options definately is to store your settings in your own table within the umbraco database. The other being in a config file if they are a small fixed number of settings
New section, where to store/retrieve configuration values?
I have successfully created my own section, to manage question entered in the frontend. The sections main folder has 3 pages: configuration, and 2 others.
By using the configuration, someone like and admin (or the section owner) should be able to set the # of days after which a question should be "archived". My question here is: how/where is it best practice to store a default value for a configuration value like this, and where to store the value that the user (admin) enters when changing it (in my own control)? Do we use the umbraco DB for this, some other way?
Thanks,
Jaco
Hi, in 7 days I did not a single reply to my question. It makes me wonder, is this not an active forum, or is my question so stupid that no one bothers to answer it?
Hi jwjanse
Well, I guess you've actually suffered from the forum being so active that so many post has been made that no one ever saw your post :-) That's a pitty though, since it's a good question.
I'm not sure about what it is you're asking...
The config stuff is it a node you have setup in Umbraco? Because then that really should be all you need, right? Since the value entered in these fields is already saved in the Umbraco DB.
Then it's a matter of accessing it using the API, which you can find some more information about in the WIKI if you have not done so already.
I hope this helps a bit? ;)
/Jan
Thanks Jan! This is what I was looking for. I just thought that, besides creating a document type and using it to define the config values, that since a section should be self-contained/modular, you would do this in some other way...
Hi again
Well you could make another root node in the content tree called "Settings" and then have a document type for the settings there so it does not clutter up the content structure/document types if it's general settings. If the settings are individual for each node then it makes sense to have "settings" tab on the document type.
Hope this makes sense.
/Jan
Imo, stack overflows umbraco tag is way more active than the umbraco forums.
I've kind of adopted the mindset to use stackoverflow for all technical questions, there is a tag for everything and people work hard on their stack rep now days.
Especially since stack CV went live and your stack profile can be used on their job services to find a job or employees.
It would be really cool if Umbracos Forum support the Stack Exchange OAuth API and made it so if you ask a question here it also shows up on Stack under the Umbraco tag or something like that.
Then you get eyes from both places.
As im not yet familiar enough with peta poco the orm of choice for storing data im using entity framework. But the point is one of the options definately is to store your settings in your own table within the umbraco database. The other being in a config file if they are a small fixed number of settings
is working on a reply...