[module] Rep[lacement]Tags [Drupal6]

HOT TIP: this content is flagged as highly recommended !


Project page quote (external)

The Rep[lacement]Tags module allows you to define tags (like $MYTAG$ or {DATE} as 'tokens' or 'markdown') and replace them with :

- user-defined content (custom text, images, code, ...),
- dynamically-generated or system values,
- or use RepTag to format your pages with simple markup-style tags.

Embed Drupal Blocks, Node metadata, User info, Images and videos with plain-text syntax like:

{BLOCK:image:Random image} {AUTHOR} {YOUTUBE:Z4VNMERVsC4}

Should be compatible with both WYSIWYG and plaintext editors.

As far as consistent authoring is concerned, I consider this one of the handiest modules in Drupal, because it promotes the Don't Repeat Yourself (DRY Principle) pattern and helps prevent the Write Everything Twice (WET) (because "we enjoy typing") anti-pattern.

Example: it is useful for creating complex markup such as a linked company logo encapsulated as a RepTags "macro". Just drop in $mycompany$ in any page for consistent markup throughout. If the target of the link has to change (say you changed your about page) then just change the link target in the RepTag macro, respecting the DRY principle.

I use this for the Webel IT Australia site text logo markup: webel-reptag-macro.png. The RepTag for the unlinked verson is:

<span style="font-weight:bolder">W<span style="vertical-align:25%;font-size:smaller"><span style="color:red">e</span><span style="color:green">b</span></span>e<span style="color:blue">l</span></span>

Would you want to repeat that throughout a site ?

I have previously made massive use of this module on every Drupal6 site I developed. Unfortunately, it is not yet available for Drupal7; I am considering taking over maintenance of the module to upgrade it.

Visit also