# Templater plugin (1.5 and newer): New Syntax and Examples

**URL:** <https://forum.obsidian.md/t/templater-plugin-1-5-and-newer-new-syntax-and-examples/16513>\
**Category:** Plugins\
**Tags:** plugin-release\
**Created:** [April 14, 2021, 2:20pm UTC](https://forum.obsidian.md/t/templater-plugin-1-5-and-newer-new-syntax-and-examples/16513 "2021-04-14T14:20:41Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![Moonbase59](https://forum.obsidian.md/user_avatar/forum.obsidian.md/moonbase59/32/13648_2.png) [@Moonbase59](https://forum.obsidian.md/u/Moonbase59)\
**Post date:** [May 6, 2021, 4:36am UTC](https://forum.obsidian.md/t/templater-plugin-1-5-and-newer-new-syntax-and-examples/16513/20 "2021-05-06T04:36:38Z")

</div>

### Templater 1.6+: Combining _dynamic commands_ and _Javascript_ commands (undocumented)

Say you have a front matter field `deceased:` but only want to calculate/show the date _if_ it’s defined (or non-empty), and a simple `-` if not.

You _can_ actually _combine_ Templater’s `<%+` (dynamic) and `<%*` (Javascript) “introducers” as follows:

Use `<%+*`—this should produce dynamic results (if I’m not being caught by caching again):

```auto
<%+* if (tp.frontmatter["deceased"]) {tR+=moment(tp.frontmatter.deceased).format("ddd, YYYY-MM-DD")} else {tR+="-"}; %>

```

Now isn’t Templater great?

---

_[View the full topic](https://forum.obsidian.md/t/templater-plugin-1-5-and-newer-new-syntax-and-examples/16513)._
