Eric_F
December 12, 2022, 12:14pm
1
Following https://docs.wappler.io/t/url-rewriting-with-wappler/6254#Advanced-Rewriting-with-URL-Parameters
I’m on a brand new node js project. Created a new page called test and added the following
the paragraph just shows query1.data.para
Modified the route like so
Here is what happens when I go the url and add text as test data
Tried using the parameter on its own
It only worked when I used both
I assume I am just missing something simple. Thanks for any help.
Teodor
December 12, 2022, 12:26pm
2
So what exactly did you add on the page?
Eric_F
December 12, 2022, 12:28pm
3
I just have a paragraph display the parameter
So it should just show the parameter in the URL as text right? Or am I thinking about this wrong.
Teodor
December 12, 2022, 12:31pm
4
You should not use the query manager here. It is only needed when you want to change the param value, not when you just want to read or use it on the page.
All you need (after removing the query manager from the page) is to use {{query.para}}
1 Like
Eric_F
December 12, 2022, 12:35pm
5
Thanks, thats working. I figured it was something simple.
Is there no selector for parameters anymore? On the docs it shows that you can select it from a query which is why I thought I had to add the manager.
Teodor
December 12, 2022, 12:37pm
6
Well, in order to see the query params in the data picker you need to define them first under App > Define Query Params in the App Structure.
Eric_F
December 12, 2022, 12:39pm
7
Is that not what I did in my first screenshot? Or was I in the wrong place?
Teodor
December 12, 2022, 12:42pm
8
The query params need to be defined on the main page, not on the content pages.
Eric_F
December 12, 2022, 12:42pm
9
Ah ok. Thanks for clarifying everything for me!