I am excited to annouce the macrotags.module, which allows users to create dynamic content with minimal semantics.

Macrotags essentially work by mapping user-friendly syntax to PHP functions. Here is what a macrotag looks like:

[time|now]

When the above macrotag is rendered, it displays the current time. Whenever the page is viewed again, the time is always updated. Likewise, you can replace the 'now' component of the macro with just
about any textual datetime description you can think of. Here are
some examples:

[time|next Thursday]
[time|1 month ago]
[time|yesterday]

When any of the above macros are viewed, they will display the
actual times based on the textual descriptions.

There are several pre-built macros (such as printer friendly pages and link creation) that come with this module, and programmers can add as many macros as they want. You can use the same macro over and over again within your content and you can even have unlimited nesting of macros. Finally, macros can be tied to roles to control who can execute a given set of them.

The module is located on the projects page.

Comments

Hutchison@drupal.org’s picture

Thanks for the new module, its handy.

I'd like to especially thank you for the nice comments in your code. Very professional. Its a big help to me as I try to learn how to modify & create Drupal modules myself. Thank you.

matt westgate’s picture

I can't take credit for the format of the comments. I got the idea from jhriggs' well crafted and documented menus.module. And most of my hook documentation came straight from the Drupal handbook :-)

I'd love to hear your macrotags feedback if you have time to explore it. I'm still trying myself to figure out what it should really do!