There is not exactly universal variables you can use in any content right now.
It depends how you want to use those “variables”.
Here are a few ideas:
Actual variables you can use in a script
Define variable in some page and include that page when you need those variables and use a script macro when you need it a in:
{{include reference="MySpace.MyVariables"/}}
Download [[{{velocity}}${REF.PROJECT}\Architecture\filename.docx{{/verlocity}}]].
{{velocity}}
See $REPO/projects/project/src/main/Filename.java for the implementation of the file name.
{{/velocity}}
Where MySpace.MyVariable
contains:
{{velocity output="false"}}
#set($REF =
{
'PROJECTS' : 'Y:\Documents\Clients\Ministry\Projects',
'OTHERS' : 'Y:\Documents\Clients\Ministry\Others'
})
#set($REPO = 'https://svn.ministry.com')
{{/velocity}}
Wiki macros
In xwiki.org we use the following macro http://www.xwiki.org/xwiki/bin/view/Macros/SCM.
If we ever move XWiki repositories somewhere else we just need to modify the macro (will happen soon for xwiki-enterprise for example, thanks for the reminder ).