tag
January 5, 2022, 7:16am
1
I'm having trouble to access URL parameters.
I have followed both guides:
Intro
With Wappler you can access the values of your URL Parameters. For example you can access and use the value of myparam from the following URL: https://mysite.com/page.html?myparam=123
Defining URL Parameters
In order to see the URL parameters in the Data Picker and use them on the page - for example to filter a database query or to show/hide specific page elements depending on their values, you’ll first need to define them.
Select App in the App Structure (1), make sure your App has an…
&
If you don’t know how to define an URL parameter on your page, please check this tutorial as you will need this later.
First, we need to create a server action. Open the server connect panel and click the add new button:
[image]
We call it product_details:
[image]
Then right click GET under Globals menu:
[image]
Add variable:
[image]
This variable will be used to filter our database query. Let’s call it: productid (NOTE - it needs to be lowercase).
[image]
Right click steps:
[i…
but when I try to get the variable it would be null, whenever I try to use it for db queries/display it in a paragraph it will be empty.
I'm no sure if its related but I get this error in the console:
"BaseComponent.js:301 Unknown component found! query-manager"
my target is a node+ docker deployment
any suggestions?
sid
January 5, 2022, 12:51pm
2
Hi. Welcome to the community.
Based on the error, it seems you have not saved the layout page.
Whenever you add a new type of component in any of the content pages in NodeJS, Wappler automatically added required JS/CSS files in the layout page associated with that content page.
Either you are missing the layout page, which means there is an issue with the project setup itself.
Else, you should see that there are unsaved changes in layout page. Just save that and try again.