Parameter as part of URL

If I have a URL like this:

http://localhost:8100/winners/?code=1234

Is it possible to configure the page so that the parameter is passed as this:

http://localhost:8100/winners/1234

Yes, please check:

1 Like

I think I’m being an idiot here @Teodor.

I’ve setup the routing as follows:

image

Than I added a App parameter:

image

Finally as a test I just set an edit box value to this parameter:

image

When I open the browser at http://localhost:8100/winners/1234 it does not show 1234 in the edit field.

What server model are you using? Is that a content page or a full page?

Docker Hosting / NodeJS

image

Ok and is that a content page you are working on?

Yes I think so. Getting to grips with the Wappler terminology. I think a content is a dynamic page right?

So where are you using the query.code on your page exactly?
What if you bind anywhere on the page

<p>Code is: {{query.code}}</p> 

do you see your code when you load the page?

No I see the code you written so it looks like the page is somehow not dynamic. I’ve obviously done something wrong.

image

image

Can you share your whole page code please?

Here’s the code:

<dmx-serverconnect id="serverconnect1" url="api/get_winner"></dmx-serverconnect>

Code is: {{query.code}}

Is this the WHOLE page code? No comments on top?

Sorry had to take a screen grab in the end as for some reason it would not paste it all:

Can you try moving the green comment at the top of the page please?

Just tried and still no difference:

And you still see {{query.code}} as a code?

Yes I am

Something is not right with your layout page then. Can you check this please?
Also do you see any errors in the browser console?

Here’s the code in my layout:

So: