Adobe-Marketing-Cloud / aem-guides-wknd-events

Step by Step guide to creating a Single Page Application to use with AEM
48 stars 34 forks source link

[React] How can I pass dynamic query params between diff routes, like (:/id) #86

Open fusionproj opened 4 years ago

fusionproj commented 4 years ago

Local Environment Before filing an issue, verify that the prerequisite tools/software are installed:

Describe the issue A clear and concise description of what the issue is.

Where in the tutorial are you experiencing an issue?

In Chapter x in Step # 99 ->

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

fusionproj commented 4 years ago

@godanny86 can you please help me in this.

godanny86 commented 4 years ago

hi @fusionproj is it possible to use query parameters? Or do you have to use :/ ?

fusionproj commented 4 years ago

@godanny86 I have to use :/

godanny86 commented 4 years ago

Sorry for the slow response. What does your URL look like? I'm assuming: http://localhost/content/spa/us/en/home.html:/id ?

ootb i think the suffix works: http://localhost/content/spa/us/en/home.html/id.

The problem is that when you add the : colon AEM will interpret that as part of the extension i.e .html: and can't process it. You could do something with Sling Mapping to remove the : before AEM processes it I think* https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html