Instance Functions

Learn how to use all of Parsley's instance functions to access instance variables.

instance.cdn

Access the full url to the Satellite™ CDN.

{{instance.cdn}}

instance.date()

Access the date from the Satellite. Additional formatting options.

{{instance.date()}}

instance.searchformatted(search_term)

Search a Satellite's meta titles and descriptions.

Returns search results in this format:

<ol class="search-formatted">
<li onclick="window.location='/menu-sweet/'">
<a href="/menu-sweet/">Sweet Menu</a>Meta Page description
</li>
</ol>

Parsley code used to return the the search results:

{{instance.searchformatted(my search term)}}

instance.domain

If domain is set for the instance, this call will return it.

{{instance.domain}}

instance.lorem(number)

Generate lorem ipsum placeholder text on the fly.

{{instance.lorem(200)}}

instance.sendemail(subject, body, to_address)

Send an email with a Parsley call. This requires a verified email in settings > contact form. Use ,, the ascii code for a comma in place of commas in the subject and body arguments.

{{instance.sendemail(hello stuaaaaaart,You are my biggest&#44; bestest fan, stuart@zesty.io)}}

instance.subnav()

Generate a formatted Sub Navigation.

<ul id="sub-navigation" class="sub-navigation">
<li>
<a class="sub-navigation categories" href="/about/categories/" title="The Categories">The Categories</a>
</li>
</ul>

show two sub levels and the auto generated header

<h5 class="sub-navigationHeader"><a href="/about/" title="About" class=" at">About</a></h5>
<ul id="sub-navigation" class="sub-navigation">
<li>
<a class="sub-navigation categories" href="/about/categories/" title="The Categories">The Categories</a>
</li>
</ul>
{{instance.subnav(false)}}
{{instance.subnav(true 2)}}

instance.truepath(ZUID)

Truepath takes in a UUID-like identifier, called a "ZUID", which can be located in the the Zesty.io Manager url. Truepath returns a perfect url path to the znode content id. Use true path to ensure links never break.

{{instance.truepath(501)}}