Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • jwjanse 13 posts 33 karma points
    Feb 27, 2011 @ 14:42
    jwjanse
    0

    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

  • jwjanse 13 posts 33 karma points
    Mar 06, 2011 @ 09:47
    jwjanse
    0

    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?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 06, 2011 @ 20:11
    Jan Skovgaard
    0

    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

  • jwjanse 13 posts 33 karma points
    Mar 06, 2011 @ 22:12
    jwjanse
    0

    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...

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 06, 2011 @ 23:03
    Jan Skovgaard
    0

    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

  • Ryan 3 posts 74 karma points
    Jul 21, 2016 @ 20:00
    Ryan
    0

    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.

  • Ian 178 posts 752 karma points
    Jul 21, 2016 @ 21:51
    Ian
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft