Sha256: a20138741f114f288aca829dd1e65c3c4f606db5815c3d8ae16c3ffe411e21ca
Contents?: true
Size: 1.17 KB
Versions: 19
Compression:
Stored size: 1.17 KB
Contents
<h2>Special values</h2> <h3><span class="function">site_url</span> - The base url for the website including protocol and port based on the current request.</h3> <pre> {{ site_url }} = http://testsite.com </pre> <h3><span class="function">content_for_layout</span> - Inserts the contents of a page that defines it as its layout page.</h3> <p>If there's a page called "layout" that contains the following:</p> <pre> <html> {{ content_for_layout }} </html> </pre> <p>And a page called "content" that specifies "layout" as its layout page (done via the CMS UI):</p> <pre> <div>Content</div> </pre> <p>This results in:</p> <pre> <html> <div>Content</div> </html> </pre> <p>{{ content_for_layout }} can be nested in any number of pages to allow for layouts within layouts.</p> <h3><span class="function">params</span> - The params value is available in all pages and contains all parameters passed to the page via a GET or POST request.</h3> <p class="example">For a page request of /path/page?test=1</p> <pre> {{ params.test }} = 1 {{ params.url }} = pathpage {{ params.url[0] }} = path {{ params.url[1] }} = page {{ params.url[2] }} = '' </pre>
Version data entries
19 entries across 19 versions & 1 rubygems