Server-Side Data Not Pickable in Data Picker on Layout Page

Wappler Version : 5.4.3
Operating System : Windows 10
Server Model: NodeJS
Database Type: SQLite
Hosting Type: Wappler Local

I may be doing something wrong, but I believe server-side data isn’t available in the data picker on a layout page.

Following Sever Side Rendering with NodeJS

shows adding template data and binding to it on each content page.

I was hoping to do it all via the layout page but the SEO query that I set as a server side data - server connect is not visible from the data picker.

but if I manually enter the query eg - seo_test_query.og_title

it appears to work.

Related thread - Question Regarding SEO Globals

Not sure if this is intended to be this way, a bug, or not implemented at all. Sorry again if I am just doing it wrong/missing something.

I am not entirely sure what exactly are you doing, and your other topic doesn’t really help making things clearer, but as explained in the docs, you need to add the server action you want to use for server side rendering on the content page and its data will be available to pick then:

Is it required to add it to the content page rather than the layout page? I would just be adding the same binding on each page. It seems counter to what a layout page is, which is to avoid having to remake the same thing on all of your content pages.

The way I had previously done it was with a global action. Just query the SEO table for an entry matching the Server URL. Then bind each value to the corresponding meta tag all on the layout page. As seen in Brian’s tutorial https://www.youtube.com/watch?v=Mx9dcR7Hp6I

I wasn’t sure if that way would properly set the social media meta tags. So, I tried to do it with the server-side data. I was hoping to just remake the SEO query I had in global as a normal server connect and set it as the server-side data server connect.

But the output for that server connect query is not accessible in the data picker. If I manually enter the query results into the meta tag fields, it appears to work properly.

Having to make a data template for each SEO field and then also connect every content page’s SEO query to all of those fields seems excessive compared to the way in the video.

Is it not possible to just do it in the layout page? As stated, when I enter the query results manually into the meta tag fields it appears to be working, they are just not visible in the data picker.

Hopefully I explained it a bit better, but if you need any more info let me know.

Yes it is required this server action to be added on your content page. And that is how it is already explained in the tutorial.

What exactly do you enter there? Paste the code here please.

This is my layout page properties

in the og_title meta tag I just type in

seo_test_query.og_title

as you can see the query results are not visible

but it seems to work

You try to enter some values on the LAYOUT page and not on the content page Is that correct? If that’s the case can you please post the code of your LAYOUT page with the code you entered?

Ok i see what you mean - the server action selected for the server-side data on the page should appear in the data picker indeed. We are going to check this.

That’s some different approach than what our tutorials show, that’s why i was confused by what you are doing.

Ah ok, it just seems a waste of time to me to have to enter it in on each content page.

If you were to do as your tutorial shows, am I correct in assuming you would need to set up the server action and bind the query results to all of created data templates on each content page? If you have say 10 pages and are using 10 meta tags, you would have to connect 100 query results to the templates?

Also, can I delete the code and video I posted? Or send it to you in a message?

Yes, or you can do it on one page and copy them to the rest.

Yes, we don’t need these any longer

1 Like

Fixed in Wappler 5.5.0

1 Like