7

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

  • 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 Nov 23 '12 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 Dec 3 '12 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? – Bob Buzzard Dec 4 '12 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 Dec 4 '12 at 12:52
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.

  • Will see what is the customer feedback, as currently this is how I have it setup, thanks @BobBuzzard – rumdumdum Dec 13 '12 at 17:11
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.

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

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 which enables all the relevant pages and classes in one fell swoop without a bigass checklist of individual configs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.