Wrapper templates make up the base of every page. Every site must have a 'default' template. If you need different looks or uses for parts of your application you can create alternative wrapper templates.
Think of the wrapper as a combined footer and header for your application. Additionally, the separate wrappers can be created for text of HTML email formats. Common meta, CSS and JS information should be placed in your Wrapper. It controls everything except for the main content of a page.
A very basic example of a wrapper template:
<html> <head> <title>Walken.tv UGC site - {$$pageTitle}</title> {$cssLoader} <fm:Switch value="{$$basepage}"> <fm:Case value="entry"> <fm:FileInfo mid="{$$metaFields.id}"> <meta name="description" content="{$media.message}" /> <meta name="title" content="{$media.title}" /> </fm:FileInfo> </fm:Case> </fm:Switch> </head> <body> <h1>Title</h1> {$content} </body> </html>
Name | Description |
---|---|
application.facebook_app_id | The Facebook App ID of the Application. This can be set in the "General" tab of the Application Settings page. |
basepage | The current base-page. For example: "home", "entry", "mediadetail". |
content | The main content of the page. The Application Template for the current page replaces this var. |
cssLoader | This spits out the link for the CSS stylesheet required for styling the application. |
metaFields.id | If the current page is a mediadetail page (Includes the module 'FMModule_MediaDetail') you can access the media ID of the current media using this var. |
pageTitle | The current page's title. This can be set in the Application Templates using the <fm:PageTitle> component. |
subpage | The current sub-page. For example, in "http://contest.projects.fm/entry/5467821" the sub-page is "5467821". |
vhost | The URL of the current Application. This var doesn't include the protocol. Remember to add "http://" before. |
vhostid | The vhost ID to which the Application belongs. |
Name | Description |
---|---|
htmlheaders | This spits out the page meta tags, CSS loader path and glbal vars in the head of the page. |