Getting started
Sections
Help

Layout variables

From Snowfire Wiki

Jump to: navigation, search


Layout variables is how you access dynamic data inside your page layout.


Contents

Page name

Displays the current page name.

{ var_pageName }

Example:

Welcome to this page!


{ var_pageNameLowerCase }

Example:

welcometothispage

Page identifier

A unique numeric identifier.

{ var_pageId }

Example:

5

Date

Displays the publish date of a page (change publish date in page settings):

{ var_publishDate }

Example:

2010-08-24

For formatting options, see fnc_publishDate

Paths

This is how you access files uploaded to the various directories via FTP.

Images

{ var_images }

Example usage:

<img src="{ var_images }/logo.jpg" alt="My Logo" />

Javascripts

{ var_javascripts }

Example usage:

<script type="text/javascript" src="{ var_javascripts }/script.js"></script>

CSS

{ var_styles }

Example usage:

<link rel="stylesheet" href="{ var_styles }/style.css" type="text/css" />

URLs

Site

{ var_site }

Example:

http://my-site.snowfireapp.com

Current URL

{ var_url }

Example:

http://my-site.snowfireapp.com/my-page/sub-page


{ var_urlNoDomain }

Example:

/my-page/sub-page


{ var_pageUrl }

This is the base page URL, with no pagination data appended.

Example:

my-page/sub-page


{ var_pageFullUrl }

This is the full base page URL, with no pagination data appended.

Example:

http://my-site.snowfireapp.com/my-page/sub-page
Views
Personal tools