Skip to content

Instantly share code, notes, and snippets.

@allusis
Last active November 30, 2016 22:20
Show Gist options
  • Save allusis/d07ca75b8bbf8f223480 to your computer and use it in GitHub Desktop.
Save allusis/d07ca75b8bbf8f223480 to your computer and use it in GitHub Desktop.
Visualforce page template page and insert page
<apex:page docType="html-5.0" showHeader="false" sidebar="false" standardStylesheets="false" applyHtmlTag="false" applyBodyTag="false" >
<html dir="ltr" lang="en-US" >
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"></meta>
<!-- vfsass is the name of our static resource, replace this with your own file -->
<apex:stylesheet value="{!URLFOR($Resource.vfsass, 'css/main.css')}"/>
</head>
<body>
<c:Header />
<!-- This is where your content pages will show up -->
<apex:insert name="body"/>
<c:Footer />
<!-- If you reference external files, be sure they can be served over https -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="{!URLFOR($Resource.vfsass, 'js/main.min.js')}"></script>
</body>
</html>
</apex:page>
<!-- If you need to include Chatter, or any standard Salesforce components, you'll need to set standardStylesheets="true", this will affect only this page since we are setting it false in the template -->
<apex:page docType="html-5.0" showHeader="false" sidebar="false" standardStylesheets="false" applyHtmlTag="false" applyBodyTag="false">
<title>Page Name</title>
<!-- composition template should match the name of your template page -->
<apex:composition template="sample-template">
<apex:define name="body">
<p>Page content here</p>
</apex:define>
</apex:composition>
</apex:page>
@allusis
Copy link
Author

allusis commented Nov 30, 2016

Oh my... What happens when you set the body to false on the composition page? Does it remove them from the template page? Is this attribute extraneous in the composition?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment