8

I am looking for the best way to include a Salesforce Site within a managed package, my current plan is to include the Site Active visualforce page i.e. the landing page and all of the other metadata components in a managed package, create sites manually in organizations where the package has been installed and reference the Visuaalforce page in my managed package as the Site home page?

Cheers

4
  • 1
    SFDC docs state that sites are not packable, so one way or another there has to be a manual intervention on deployment - eu1.salesforce.com/help/doc/en/sites_considerations.htm
    – rumdumdum
    Commented Nov 23, 2012 at 10:51
  • Also watch out for packaging Site Template Visualforce Pages (e.g. using the apex:composition pattern), as there are documented problems related to this. Just create Site Templates as part of the manual setup process, either by cloning from a packaged page or by manually creating one branded for the client.
    – zachelrath
    Commented Dec 3, 2012 at 18:38
  • @zachelrath - what problems are these? I've packaged templated pages a few times without issue. Is there a time bomb waiting for me? Commented Dec 4, 2012 at 8:58
  • @BobBuzzard Here's a long-running developer board post explaining the problem. It was marked as solved, but it definitely has not been... scroll to the bottom to see feedback from users still having the problem: Managed package VF page referencing $Site.Template (stock site template)
    – zachelrath
    Commented Dec 4, 2012 at 12:52

3 Answers 3

2

That's the way that I usually do it, as long as the customer doesn't need to be able to customize the pages in the site. Adding a Visualforce page to a site also includes any Apex code and Visualforce components that it relies on.

I also include a setup guide as part of the package that walks the administrator through the site setup, especially if I'm expecting it to be installed by admins that are unfamiliar with this process.

1
  • Will see what is the customer feedback, as currently this is how I have it setup, thanks @BobBuzzard
    – rumdumdum
    Commented Dec 13, 2012 at 17:11
2

Do remember one thing. you can reduce a great deal of the manual post-install steps by packaging a Permission Set containing:

Apex Class access Visualforce Page access Object CRUD permissions Field Level Security permissions

Then in your documentation, instruct users to create (or edit) their Site, go to Public Access Settings > View Users, then create a Permission Set Assignment on the Site Guest User

1

One approach we take is to have a Start Here page that dynamically checks to see whether a customer has created a Force.com Site yet. If they have not, a 'Create a Site' link is presented that takes them to the New Site page. This Start Here page dynamically checks using JavaScript, so as soon as a Site has been created, it knows, and then prompts with the next step in the process, e.g. setting Profile settings for the newly-created Site's Guest User profile.

1
  • thanks @zachelrath will definitely consider your approach if customer request more handholding with the setup
    – rumdumdum
    Commented Dec 13, 2012 at 17:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .