Hello.
I want to use variable as token. It will be very usefull in many cases, for example in metatags. I think that use separate token for each variable as in module token_var is not very good idea. And I prepared patch for use variable in token dynamically by name.

Example of use:
[variables:variable-name:site_slogan]

UPD
https://drupal.org/project/variable module provides this feature by default
This is more preferable way to use variables as tokens
Example: [variable:site_mail]

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eugene.ilyin’s picture

I will be glad if you will apply my patch and specify me as author of commit.

eugene.ilyin’s picture

Status: Active » Needs review
aes3xs’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)
eugene.ilyin’s picture

Status: Closed (won't fix) » Needs review

What the problem?

eugene.ilyin’s picture

Any news?

Dave Reid’s picture

Status: Needs review » Closed (won't fix)

I think this opens up a huge security risk. Just by granting a user access to the token filter means they can then get my site's cron key, private key, and other "confidential" information that may be stored in the variables table. I'm not willing to risk this in the Token module, so I think it's a solution better implemented by modules which are able to "know" more information about variables, which seems like a good job for the Variable module.

That said, any variables that would be commonly used are already available under the [site:*] tokens, like [site:name], [site:slogan], etc.

eugene.ilyin’s picture

Yes, I understand. Thank you.