im going cracy
i need to pass to a snippet a value from the template in couldent do
y use [[snippet?myvariablename=myvariablevalue]]
i dont know whath i need to take the value to the snippet
whats need
is posibol to pass multiples values lika a array...
thaks
You can do this
[[snippet?var1=cheese&var2=cheesier&var3=cheesiest]]
-
☆ A M B ☆
- 24,524 Posts
You could "fake" an array by passing an argument like this: [[MySnippet?arrayArg=`arg1-arg2-arg3-arg4`]], and then in the snippet load an array from the argument with
if(isset($arrayArg)) {
$arrayArgs = explode("-", $arrayArg);
}
I’m not sure if there’s any limit to the length of an argument
Take a look at some other snippets to see how they handle their arguments, most of the menu snippets have several possible argument that they process, usually near the top of the code.
Basically, it’s just something like
$argA = isset($arg) ? $arg : "default";
thanks very much
i continue working in my snippet