Why Generate HTML Tags?

Most web content management systems offer a graphical editor to build common HTML tags such as those used to render images, lists, anchors, et cetera. The problem with creating this type of content in an unstructured way is that the resulting components tend not to be reusable. For example, if you want to repeat a list of items on several pages you would need to copy and paste the original list. This results in multiple copies of the same content that must be kept in sync manually. Using GenHelm, you can create this list once and refer to the list on any number of pages. If you modify the list, your changes are automatically reflected in all of the pages that reference the list.

Pairing Models with Dollar Functions

Most tag-oriented models are supported by a dollar function which is used to generate the tag whose content is defined by the model. Note that dollar functions can be interspersed with any textual content so they serve as placeholders that will be exchanged for dynamic content.

Consider the following specification, named bootstrap, that is used to define an anchor (link) to the Bootstrap site.

Specification used to define a link to Bootstrap

This anchor could be rendered on any page of your site (for example a page generated using the WYSIWYG model) by entering the placeholder $anchor(bootstrap). One of the advantages of this approach is that all of your outbound anchors are organized centrally so that you don't need to go searching throughout your site content to determine to which external sites you link.

Follow the links below to get more information on a particular tag-oriented model. There are also several tag-oriented models that have been grouped in with the form-oriented models because they generate tags that are primarily used within forms.

HTML Tag Oriented Models

  1. anchor is used to define external links and links to site documents such as PDFs. This is paired by $anchor.
  2. audio is used to define audio tags to play MP3 files, et cetera. This is paired with $audio.
  3. list defines ordered and unordered lists. This is rendered using $list.
  4. video defines video tags used to play MP4 files, et cetera. This is paired with $video.

In addition to these tag-oriented models, several form related tag models are described in the form processing section.