Skip to content

Instantly share code, notes, and snippets.

@michael-cannon
Created August 28, 2012 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michael-cannon/3496261 to your computer and use it in GitHub Desktop.
Save michael-cannon/3496261 to your computer and use it in GitHub Desktop.
For in2master, I wanted the ability to autoset config.absRefPrefix, specifically set it, or unset it without a lot of hassle. The following code does such.
config {
# cat=basic/links; type=string; label=Absolute Reference Prefix: Used to convert relative paths to absolute paths. Use absolute URL like "http://www.example.com" to set. If empty, config.baseURL is used. If 0, config.absRefPrefix is unset.
absRefPrefix =
}
[globalVar = LIT:0 = {$config.absRefPrefix} ]
config.absRefPrefix >
[globalVar = LIT: = {$config.absRefPrefix} ]
config.absRefPrefix < config.baseURL
[else]
config.absRefPrefix = {$config.absRefPrefix}
[end]
@michael-cannon
Copy link
Author

specifically set absRefPrefix

config.absRefPrefix = http://www.example.com

autoset config.absRefPrefix

config.absRefPrefix =

unset config.absRefPrefix - useful for when TYPO3 extensions don't play well with others

config.absRefPrefix = 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment