[support] Extra sitewide variables/configuration - where best to put them?
Metzler, David
metzlerd at evergreen.edu
Wed May 16 15:22:13 UTC 2007
The last time I needed some site/theme specific variables, I developed a
little one-off custom module called evergreen_settings. I made a
settings form to access this information. I do think this is the best
course of action.
You do need to learn enough of the forms api to do develop a settings
page. I then accessed these variable_gets from within my themes.
If you're interested in going down this road, I'd be happy to share the
module with you. You'd have to rename/customize it for your own site.
Dave
-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of sessy
Sent: Wednesday, May 16, 2007 4:17 AM
To: support at drupal.org
Subject: Re: [support] Extra sitewide variables/configuration - where
best to put them?
AFAIK you can call variable_get() from the template.php file, than use
http://api.drupal.org/api/5/function/_phptemplate_variables to "inject"
the data.
s
On Wed, 16 May 2007 09:53:15 +0100
J-P Stacey <jp.stacey at torchbox.com> wrote:
> Hi,
>
> We're building a site for a client that's taking donations on a
> rolling basis. We'd therefore like to have e.g. the running total of
> donations stored in some centralized place that the client can update,
> and I was wondering where would be the right place to put that.
>
> Any ideas? Extra input fields on admin/settings/site-information would
> feel right, but I'm not sure how to hook into that or if so how to get
> at the additional content from within PHPTemplate.
>
> Best regards,
> J-P
> --
> [ Drupal support list | http://lists.drupal.org/ ]
--
[ Drupal support list | http://lists.drupal.org/ ]
More information about the support
mailing list