Adding Options to my Extension

View: New views
2 Messages — Rating Filter:   Alert me  

Adding Options to my Extension

by Chris Parrish-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What's the preferred way to add options to an extension.  I want to let
the developer configure things like path locations so that their choices
are loaded at startup (and then used by my extension).

-Chris
_______________________________________________
Radiant mailing list
Post:   Radiant@...
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Re: Adding Options to my Extension

by Sean Cribbs-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Chris,

I like to use Radiant::Config.  So if my extension was named Foo, I
might do something like this:

Radiant::Config["foo.file_path"] = "/some/path/to/somewhere"
Radiant::Config["foo.download_enabled?"] = true

Sean

Chris Parrish wrote:

> What's the preferred way to add options to an extension.  I want to let
> the developer configure things like path locations so that their choices
> are loaded at startup (and then used by my extension).
>
> -Chris
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@...
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
>  

_______________________________________________
Radiant mailing list
Post:   Radiant@...
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant