Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-02-12 11:32:29

milkshake
Member
From: Linz, Austria
Registered: 2007-06-24
Posts: 80
Website

How to store / output extra site prefs?

I often make sites based on a customised version of a base template.

When setting up a new site, there are certain strings in the template that need changing each time (API keys, etc.)

Trying to streamline this, I wanted a central place to define these variables, to avoid digging through the template each time.

I tried 2 approaches:

  1. Extend the global $txpcfg array defined in config.php
  2. Create an article + custom fields to query for the info

Neither seem ideal, and both require a fair amount of code just to output a string.

Is there a plugin to manage + output a list of custom variables / site preferences?
Or, how do you manage this?

Offline

#2 2010-02-12 11:36:48

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: How to store / output extra site prefs?

adi_variables perhaps?


TXP Builders – finely-crafted code, design and txp

Offline

#3 2010-02-12 11:43:24

milkshake
Member
From: Linz, Austria
Registered: 2007-06-24
Posts: 80
Website

Re: How to store / output extra site prefs?

Thanks :)

Offline

Board footer

Powered by FluxBB