0

I am trying to convert a public (no-login) sites page to a public (no-login) Lightning Community with a context-sensitive LWC in it (requiring parameters).

One of the nice things about public sites pages is you could pass URL parameters like this in a link that you provide (for example) in an email:

[site URL]?param1=value1&param2=value2&param3=value3.

The parameters above are available to your apex/visualforce code.

Is there a way to do this with a public Lightning Community that contains an LWC that needs the passed in parameters? It seems like the parameters are wiped out whenever I click on a community link where I am trying to pass parameters.....

(I was able to pass GET/URL parameters to a public REST API community. That works fine as the parameters are available in the REST request object.)

Thanks in advance for your help!

3
  • if I summarize, ur que is how to open a lwc/aura comp as url as we can do with VF page. so its not possible in community. you will have to use create a new community page then drag lwc there. add logic to get params from page url.
    – Ayub
    Commented May 4, 2020 at 23:47
  • I am not sure about this part It seems like the parameters are wiped out whenever I click on a community link where I am trying to pass parameters. If I go here, the parameters are still available: mstools.force.com/…
    – manjit5190
    Commented May 5, 2020 at 5:03
  • Ayub you are onto something good! I created an additional page for my public community and when the URL is for that page the URL parameters are NOT wiped out when you click on the link (to the secondary page). Thanks!
    – Dave C
    Commented May 5, 2020 at 12:13

2 Answers 2

1

Creating a secondary page for the community and passing URL parameters to the secondary page worked!

0

IDK if this is specific to this issue or not but I had a very similar issue today. I was trying to pass parameters like this:

"https://mysitename.com/s/respond?param=123"

But, for whatever reason, when it sent to the DNS it stripped it down to:

"https://mysitename.com/s/respond"

BUT when I used:

"https://www.mysitename.com/s/respond?param=123" (adding www.)

it wouldn't strip the parameters off. Maybe not the exact answer but hopefully it helps someone :D

You must log in to answer this question.

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