raulriera edited this page Sep 13, 2010 · 4 revisions

Pages are the main content holders of your site. The following features have been implemented into pages:

  • They can be made up of multiple parts
  • They can contain HTML and SplashTags to build content
  • You can use SplashTags to integrate other content such as snippets

Page Parts

Pages can contain multiple “Page Parts” or a single part. Its completely up to you. Out of the box, Splash uses two default Page Parts named body and extended. What they are called is really up to you as you control how they are output in your layout.

Default Page Parts

To change the default page parts, open the file config/settings.cfm and change the following line:

<cfset application.defaults.page.parts = ['body','extended']>

Lets say you want to have a sidebar for every page. You could change this to:

<cfset application.defaults.page.parts = ['body','sidebar']>

Or if you only wanted a body section, change it to:

<cfset application.defaults.page.parts = ['body']>

I think you get the idea.

In the page editor, you can also add page parts to a page dynamically. No page has to have the same page parts. You just have to keep in mind you are responsible for calling the proper part in your layout.

Calling Snippets

If you have a snippet that you want to call into your page. Simply use the snippet SplashTag and pass it the name of the snippet like this:

<s:snippet name="mySnippet" />

Referencing Pages

In your layouts, you will want to reference your pages so that the content can actually be parsed and output to the browser. This is done using the content SplashTag. Lets say we have a site setup using the defaults and we have our nice new layout and we want to output our page. Our page is made up of a body and an extended part by default so we want to reference them. Here’s how we would do that in our layout:

<s:content part="body" />
<s:content part="extended" />

Of course those would be place where you want the output to be rendered in your layout. That part is up to you.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.