Skip to content

Instantly share code, notes, and snippets.

@danielpcox
Created September 16, 2011 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielpcox/1223311 to your computer and use it in GitHub Desktop.
Save danielpcox/1223311 to your computer and use it in GitHub Desktop.
Parametrized Tags In DRYML
<!-- defining a tag -->
<def tag="messages">
<br /><br />
<ul>
<li param="msg1">Message 1</li>
<li param="msg2">Message 2</li>
<li param="msg3">Message 3</li>
</ul>
</def>
<!-- now we could use it in a page -->
<messages/>
<!--
Output is:
<br /><br />
<ul>
<li>Message 1</li>
<li>Message 2</li>
<li>Message 3</li>
</ul>
-->
<!-- but since some of the tags in there are parametrized, we could change the output on the fly -->
<messages>
<msg3:>This last one is changed.</msg3:>
</messages>
<!--
Output is:
<br /><br />
<ul>
<li>Message 1</li>
<li>Message 2</li>
<li>This last one is changed.</li>
</ul>
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment