Skip to content

Instantly share code, notes, and snippets.

@rwetzlmayr
Created December 4, 2010 06:09
Show Gist options
  • Save rwetzlmayr/727971 to your computer and use it in GitHub Desktop.
Save rwetzlmayr/727971 to your computer and use it in GitHub Desktop.
wet_if_comment_submitted conditional Textpattern tag
<!-- somewhere in your template, forms, -->
<txp:php>
function wet_if_comment_submitted($attr, $thing)
{
return parse(EvalElse($thing, isset($_GET['commented'])));
}
</txp:php>
<!-- in your comment form: -->
<txp:wet_if_comment_submitted>
yay
<txp:else />
noes
</txp:wet_if_comment_submitted>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment