Chapter 8. Force.com Sites

In this chapter, we will cover the following recipes:

  • Creating a site
  • Record and field access
  • Retrieving content from Salesforce
  • Web to lead form
  • Creating a website template
  • Adding a header to a template
  • Adding a sidebar to a template
  • Conditional rendering in templates

Introduction

Force.com sites allow public websites to be created in, and hosted by, Salesforce, removing the requirement to configure, secure, and manage a web server. Visualforce pages that have direct access to Salesforce data via the page controller generate the site content.

In this chapter, we will create a Force.com site initially containing static content. We will then create a set of template pages to remove repetition of common markup. Finally, we will provide ...

Get Visualforce Development Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.