That’s very friendly of you, but it’s just local on my hard disc.
But I saw that the too far simplified version of my snippet works fine indeed, so I give you a less simplified one.
The point is that the options for the [tt]TV2[/tt] are the subfolders of a folder, and the snippet [tt]getOptions[/tt] has to retrieve these subfolders and put them into the ||-separated list for the Input Option Values of the [tt]TV2[/tt] .
Here is the snippet code:
<?php
$folder = 'path/to/my/folder';
$output = '';
$files = array();
$handle = opendir($folder);
while( $file = readdir($handle) ) {
if ($file == "." || $file == "..")
continue;
else {
$files[] = $file;
$output .= '||'.$file.'==/'.$folder.'/'.$file;
}
}
closedir($handle);
$output = substr($output,2); // remove leading ||
return $output;
?>
If I put the call [tt][[!getOptions]][/tt] directly into the content of the page it results in the correct string of options...