-
☆ A M B ☆
- 24,524 Posts
You should just be able to call the function in another snippet. Loading the snippet at the beginning of your template makes its functions available within MODX.
<?php
$output = test();
return $output;
Keep in mind that if you use any MODX values or API functions inside of your functions you have to declare global $modx to allow the function to access the $modx object.
Thanks sottwell, but that way i should create a snippet for each function i want to call. Is it possible instead to create a single snippet that can dynamically call each function based on a placeholder or by passing it a parameter?