Quote from: sottwell at Dec 14, 2007, 11:32 PM
That’s odd... I do it all the time. For example...
http://www.sottwell.com/article-weblinks.html
[[DropMenu? &startDoc=`0`&levelLimit=`1`]]
I do have the RTE turned off, which may have something to do with it.
I think you’re right that the RTE was causing a lot of the trouble. I did create a snippet called ModxTags that works just to see if I could do it, but I think it’s probably easier to do it your way.
<?php
// snippet: ModxTags
$text = isset ($text)? $text : "No text set";
$mode = isset ($mode)? $mode : "snippet";
if ($mode == "curly") {
return '<span class = "modx_tags">{{'.$text.'}}<span>';
} else { // assume it's a snippet
$text = str_replace("EQ","=",$text);
$text = str_replace("Q","?",$text);
$text = str_replace("AMP","&",$text);
$text = str_replace("'","`",$text);
return '<span class = "modx_tags">[['.$text.']]<span>';
}
/* usage:
For chunks: [[ModxTags? &mode =`curly` &text=`MyChunk`]]
produces: {{MyChunk}}
For snippets: [[ModxTags? &text =`MySnippetQ AMPparam1EQ'value1' AMPparam2EQ'value2'`]]
Produces [[MySnippet? ¶m1=`value1` ¶m2=`value2`]]
*/
?>
(The forum parser (or my browser) is transmuting stuff inside the code section above. The 38 entities should be ampersands.)
Bob