Want to make a variable in snippet, so i can change it’s instance.
[*variable*] won’t work..
see example:
##################################
include("db.php");
include("properties.php");
$StartSupergroep = ’35’;
####################################
I want to make StartSupergroup variable so i can change it, if i call the snippet in a document.
Anybody suggestions??
Thanks
Wim
-
☆ A M B ☆
- 24,524 Posts
You can simply put &StartSupergroep=`35` in the snippet tags, this will automatically get parsed into a variable $StartSupergroep in the snippet code. Usually you’ll check for the value and set a default if it’s not set:
$StartSupergroep = isset($StartSupergroep)? $StartSupergroep : 35;
You can use TVs and other snippets to set it dynamically in your snippet tags.
[!MySnippet? &StartSupergroep=`[*tv-value*]`!]
issue solved..
thanks for quick response..
closing topic