Attribute Transclusion Enzymes
The result of an attribute transclusion enzyme is always the value of the referred attribute.
Injection of an author attribute transclusion enzyme. (a-attr-t)
{[ /author:display_name ]} | (a-attr-t) |
Inject ´display_name´ attribute from the author of the current post.
Notes
- Origin: author. — The author origin is always referred to by ´/author´. A post reference is not present in i1 above, then the origin is the author of the current post.
- Form: attribute. — The attribute form is always referred to by a starting ´:´. The attribute is ´display_name´.
- Kind: transclusion. — The transclusion kind is always referred to by not having ´()´.
See the Notes/users section of this Codex page for a list of author attributes you can access.
Injection of a post attribute transclusion enzyme. (p-attr-t)
{[ :post_title ]} | (p-attr-t) |
Inject the ´post_title´ attribute from the current post.
Notes
- Origin: post. — The post origin is always referred to by not having ´/author´. A post reference is not present in i2 above, then the origin is the current post.
- Form: attribute. — The attribute form is always referred to by a starting ´:´. The attribute is ´post_title´.
- Kind: transclusion. — The transclusion kind is always referred to by not having ´()´.
See the Member Variables section of this Codex page for a list of post attributes you can access.
Implicit versus Explicit origins
The (a-attr-t) and (p-attr-t) injections have implicit/relative origins. Nzymes lets you specify explicit/absolute origins too. If a post had the ´1234´ ID and the ´philomycus-carolinianus´ slug, then –inside that post– the following injections would mean exactly the same thing:
- {[ /author:display_name ]}
= {[ 1234/author:display_name ]}
= {[@philomycus-carolinianus/author:display_name ]} - {[ :post_title ]}
= {[ 1234:post_title ]}
= {[ @philomycus-carolinianus:post_title ]}
Explicit/absolute origins are very useful from outside the post they reference, in fact they allow you to inject that same information elsewhere. For example, while ´{[ :post_title ]}´ is replaced by ´Philomycus carolinianus´ in the ´1234´ post, ´{[ 1234:post_title ]}´ will always be replaced by that same title everywhere, for example from the ´2345´ post and the footer template of WordPress (Nzymes allows you to do that too).
|
|
Nzymes | WordPress Plugin |
© 2015 by Andrea Ercolino |