Site Variables and Functions

Parlsey gives you access to useful site variables.  

site.cdn

Access the full url to the Satelliteā„¢ CDN.

site.date()

site.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:

site.domain

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

site.lorem(number)

Generate lorem ipsum placeholder text on the fly.

site.sendemail(subject, body, to_address)

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

site.subnav()

Generate a formatted Sub Navigation.

{{site.subnav(false)}}

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

{{site.subnav(true 2)}} 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>

site.truepath(ZID)

Truepath takes in a 'znode id', which can be located in the the zesty managers url. True path returns a perfect url path to the znode content id. Use true path to ensure links never break.

.activate_links()

Converts plain text URLS into anchor tags <a href="URL">URL</a>. Useful for the social curator tool, where text comes in with HTML stripped.