Adding Mutiple Skuid Pages into a force.com site

Hello,

I’ve been able to create a force.com site and include a Skiud page as my Home page…which is basically an AccountsTab (listing of Accounts)…now what I would like to do…is have to ability to drill down from my AccountsTab home page…into my Skuid Account Details page…how do I go about doing this? Thank you!

Because you are in a Force.com Site environment, the regular Name field links that Skuid displays won’t work (e.g. clicking on “Acme” normally takes you to the Acme account’s detail page, but from a Site, this URL syntax doesn’t work), you should probably add a Row Action to the Table in the Skuid Page you’re using for the Force.com Site Home Page. This Row Action should be of type “Redirect”, and should send the user either to another Visualforce Page containing a Skuid Page (e.g. create a VF page called “AccountDetail_PublicSite” that uses the skuid page tag to show a Skuid Page), or directly to a Skuid Page, e.g.

  • Method A: 
    /AccountDetail_PublicSite?id={{Id}}   
  • Method B: /apex/skuid__UI?page=AccountDetailFromPublicSite&id={{Id}}
Assuming that you had a VF page called something like “AccoundDetail_PublicSite” and/or a Skuid Page called “AccountDetailFromPublicSite” or something like that.

Worked!! Thanks Zach

Zach,

I have a Sites page that is showing a skuid “detail” page. However, I cannot get it to pass the Id from the URL to the page. The site and skuid page loads with no data when I don’t append the parameter: /apex/skuid__UI?page=ContactDetailStaffSites, but when I try /apex/skuid__UI?page=ContactDetailStaffSites?id=003370000033QyTAAU I get a blank page with no skuid page at all. Any ideas?

Hi Craig,

Zach will probably have a much clearer answer than me, but here’s a couple of things to check in the meantime:

- Does the site’s ‘Guest User’ profile have visibility of the object where the id is coming?
- Again in the site’s ‘Guest User’ profile, check the Field Level security for the id field of the object
- Are the sharing settings for the object set to read or read-write, or is there a sharing setting that says something like IF Account.Status__c = ‘Open’, then make it Read or Read/Write.

I guess the first thing to test is whether the page works when you are logged in, but then fails when you are logged out (or in an incognito browser). If it works when you are logged in, then its most likely a sharing setting or field-level security issue.


Greg, a couple of things:

It does not work whether I’m logged in or in incognito

I’m able to access my normal contact redirect skuid page by just entering in the contact’s id. “/003370000033QyTAAU”  

No idea why it would let me access the contact’s normal redirect page in sites. This is my first time experimenting in sites but I wouldn’t think it would show the contact detail page if any of the above security settings weren’t correct.

I checked the things you mentioned, and they look good. I didn’t see a place to enable FLS for the Id of an object, but there is Create/Read permissions for that profile. I’m receiving a Skuid error in the console when I try to add the URL parameter. Maybe that sheds some light?

If it helps, I’m using Banzai 7.5 in a Developer Org

I’m not up to Banzai 7.5 yet, but I’m not sure that’s the issue. I think the first step is to get the page working when you are logged in, and then all you need to do is adjust the security settings to get it working in a site.

It looks like the console is saying the page isn’t receiving the id parameter - can you check if the model in your page has both the ‘Id’ and the ‘Name’ parameter checked?

Yes, Id and Name are both checked and included in the model.

Here’s a screen shot of the actual error in the console.

…found the issue. I was using ContactDetailStaffSites?id=003370000033QyTAAU to add the URL parameter…not ContactDetailStaffSites&id=003370000033QyTAAU. Works now. Thank you Greg for your help! Sometimes its those little things that get you.

I know the feeling! Glad you got there.

Glad you found the issue.  I just saw it myself.  15 hours late… 

I’m making an entire site with Skuid, and we want the address bar to stay clean when we navigate from page to page. We’re still working on getting our custom domain to persist, e.g. www.fullskope.com goes to fullskope.secure.force.com, but assuming we can get that working:

what’s the best way to make sure that when we navigate to a different page it looks like /products or /services?

The one way I know is to create a new Site in Salesforce for each page, then that site would have the URL /products and have as it’s home page the VF page that contains the skuid page I want to use.

Is that the best way? Will that way even work (I’m still testing)? Is there some better way?

To take this further, eventually we want to have a Blog, and we’re thinking each blog post will be a Salesforce record of a custom BlogPost__c object, would it be possible to have the URL in the address bar be:

example.com/blog/blog-title-here-from-custom-field

as opposed to

example.com/blogPostDetailSkuidPage?id={{id}} 

Thanks!

You’ll need to take advantage of the Apex URL Rewriter functionality. This give you the ability to intercept Requests and modify them before they are handled by the server.

For example, if the user enters /products, you can intercept that URL and silently load up the /apex/c__site_prods_V1 visualforce page. Or you could intercept /blog/my_blog_title and silently load up the /apex/c__blog?name=my_blog_title page.

See the following Salesforce documentation for more information:

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_site_urlRewriter.htm

Thanks! So it looks like we can go ahead with development and worry about cleaning up the URL towards the end.