Find your content:

Search form

You are here

In Site.com how do I create a page that displays data based on a URL parameter?

 
Share

I have created a page at, say, www.mysite.com/mydirectory/dallas

And I want to display data in that page using the term "dallas" as part of a query to retrieve the right data. So I could, for instance, display information we have in our Salesforce record about Dallas.


Attribution to: Tony Brasunas

Possible Suggestion/Solution #1

You could use an alias redirect in conjunction with a data repeater. Alias redirects are server side, so the end user navigating your site is never exposed to any sort of redirect.

Here is what would need to happen:

  1. Set up an alias redirect (Site Configuration | URL Redirects) from /mydirectory/dallas to /mydirectory/dallas?id=recId. Alias Redirect

2a. In your data repeater specify that you are using an query string parameter of "id". Data Repeater

2b. (Spring '14): In Spring '14 Page Data Connections are being introduced. If you are on Spring '14 you can use them instead of the Data Repeater, if it fits your use page design. If you aren't on Spring '14, you can look at the scheduled maintenance page to see when you will be.

Note: If you really need to use the String 'Dallas' in your query you can change the URL query string parameter to be that and the redirect and data repeater to use that.

I outlined some data and content strategies for Site.com in this blog article that might might help if you are using page templates.


Attribution to: Peter Knolle
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/32802

My Block Status

My Block Content