Skip to main content

Looking for any comments on an issue spent WAY too many hours on and it's a problem.

I essentially want a Guest User to be able to access random CMS information similar to:

  1. We have 10 Accounts.
  2. Guest user visits site and will review info on 1 of the 10 Accounts. The information reviewed is a CMS doc, so not accessible via lookup field.
  3. In Experience Cloud (EC) we have the 10 CMS docs for each account. That is the ONLY thing different in each EC page. There are other things to review for the Account that are pulled from the object, but we can populate those easily.

Options I see:

  1. We can put 10 CMS items on each page and conditionally render each one based on a user attribute. But this seems very ugly? No?  If not, what if it was 50 conditions? What is the max # of unique "render conditions" on a reasonable page?
  2. We can create 10 pages and put 1 on each page, which we do now, but are having a miserable time directing user to appropriate page. It's supposed to be random so do not want them selecting pages on a menu. We are doing this via Flow and an Apex random number class and redirect URL which technically works but it's a mess.
  3. Something else...which hopefully doesn't include a lot of Apex. Again these are Guest Users.

??? Thanks!

5 comentarios
  1. 22 ene 2021, 3:39

    So the only point I don't fully agree with is how you define hardcoding.

    Hardcoding is when you put an Id in code, and the only way to get that updated is with deployments.

    Putting an Id in a field on a custom object, I wouldn't consider hardcoding. It's a very common design as a matter of fact, and we use it on our own communities. It becomes a data maintenance item like other data that needs to be maintained, instead of an Id value in code that needs to be deployed every time it needs changing.

0/9000