Overview


In this article, we are going to discuss some of the common questions and confusions regarding the HTML tag system. This article assumes you have a basic understanding of how tags are accessed. If you are new to the HTML tag system, a good place to start is here


I Followed The Documentation But The Tag Still Did Not Appear?

This is a common issue and there can be a couple of reasons why your tag did not appear. The first step is to check that the syntax you used is correct. It is easy to miss a curly brace, misspell a tag name, or improperly use a keyword. If you are certain the syntax is correct, the second step would be to make sure you did indeed follow the documentation correctly and you are accessing the correct object from the correct tag. Finally, you should be sure that the tag you are trying to access does exist in your system.


The easiest way to access deeply nested tags is by ensuring you are accessing the current object correctly by accessing its Id tag value. The Id tag is the best tag to access because you can be sure it will exist for each object. Once you know that the syntax is correct and the object does exist at this level, you can move on to the next object and repeat the process.


Why Are The Loops Wrapped in Comments?

Unlike most HTML comments, wrapping loops in comments is not just an annotation and does not negate the effects of that loop. This is simply a common convention used to standardize how loops are written. Writing a loop without being wrapped in a comment has the exact same semantics as writing a loop wrapped in a comment. For this reason, you can choose to omit the HTML comments if you wish. 


Is Every Tag Within The HTML Objects By Tags Articles Accessible?

Every tag within the HTML Object by Tags article has the potential to be accessible. However, not every tag will exist within every system. For instance, if you are trying to access the customer address tag but never filled this field for the specified customer, the address will not appear. It is important to check that the value exists before trying to access it in your documents or canned emails. 


What If I Want to Access a Tag But I Am Nested Too Deep?

A common situation you might find yourself in is that you want to access a tag value outside of the currently nested object. There can be multiple reasons for this. One reason may be because most documents include a Root Model loop at the beginning of the document and you want to access a different Root Model within it. Another reason may be that you want a deeply nested tag placed beside a less deeply nested tag with reduced code bloat. 


Regardless of the reason, you can easily start from the top of the object tree by using the @root keyword or use ../ to jump back one object. An example of these uses can be seen below. 

<!-- {{#each Orders}} --> 
        {{@root.Today}} 
        <!-- or -->
        {{../Today}}
<!-- {{/each Orders}} -->