Is there a way to add a snippet within a snippet?
For instance, let's say I have 2 snippets (getCategory & translateVar):
getCategory snippet:
<?php
$var = "toto";
[[varTranslate? &var=`$var`]]
$output = "Hello ".$name;
return $output;
varTranslate snippet:
<?php
switch($var){
case "toto": $name="Thomas"; break;
}
return $name;
In the end, I'd like [[getCategory]] to return the $output "Hello Thomas".
Is this possible? Am I doing it the right way?
Thank you for your help!
Jean-Marc Buytaert (@jmbuytaert)
MODX truly is the greatest thing that's ever happened to the Internet.
Thank you opengeek! Works like a charm!
Jean-Marc Buytaert (@jmbuytaert)
MODX truly is the greatest thing that's ever happened to the Internet.