Copied to clipboard

Flag this post as spam?

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


  • littlecharva 2 posts 22 karma points
    May 25, 2015 @ 11:18
    littlecharva
    0

    Configuration Settings for a Package

    Hi,

    I'm trying to bundle a couple of SurfaceControllers I've created into a package so I can drop the functionality into any future Umbraco instances I or a colleague create, but some of the functionality will need customising using configuration settings.  

    I know I could add the values into web.config's AppSettings and read them from there, however there doesn't seem to be a way to edit the AppSettings from within the Umbraco CMS.  As the packages are loaded from within the CMS, I'd like any configuration to be available from within there too, as it's nice and clean and means more junior employees can administer the packages without requiring access to the server.

    Is there a way to store configuration settings anywhere other than web.config, and is there a way to make configuration settings available within the Umbraco CMS?

    Thanks,
    Anthony

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    May 26, 2015 @ 10:39
    Sebastiaan Janssen
    100

    Two options:

    1. If the AppSettings are the same for each site, check out the Package Action Contrib project which allows you to specify which AppSettings to add
    2. If the settings are variable for each installation then consider using a usercontrol (yes, I know.. legacy, we need to allow for a view & controller instead) that can ask for the setting values after installing the package.

    enter image description here

    There's also the Config Tree package that allows you to manually edit web.config from within the developer section.

  • littlecharva 2 posts 22 karma points
    Jun 12, 2015 @ 08:05
    littlecharva
    0

    Excellent, thanks Sebastiaan. I'm sure I'll find one of those solutions appropriate. Apologies for the delayed response, got sidetracked with another project and forgot I'd even asked this!

    Thanks again.

Please Sign in or register to post replies

Write your reply to:

Draft