Database to single page automation

Hi, I have a grid with 12 services conected to database services , grid contains title, short description and 1 button.

If I make a single page layout with tile and rich text, is it possible to make it like if I click any service button in the grid to send me to the single page and automaticaly give me the title and rich text from the database acording to wich buton I pressed in the grid ?

But to have only 1 page which is modifing constantley according to wich button I press.


Check out

Yea I understand this , I just have difficulty with this automation , I don’t know if it’s possible …?

so in the grid if i press on button to take the title and rich text intoo single page ,

do I need to have 12 pages for the grid of 12 buttons or i can do it in only 1 page which can be dinamic , depending on wich button i press

You need only 1 page, and that page you will connect with Database, and then inside of that page you will connect each text to appropriate field.

Check video that dejan sent you, at 8:15, you will see that i have only 1 single page for blog, and I connected all blogs there.

1 Like

I did that and is working till a point. but I don’t know how to set up my buttons to do like in the picture

@KAdrian

For start you need to configure proper route for your page “Service explained”.

So change it from /service-explained to /service-explained/:slug

Once you did that, go back to your button (links) and in Advanced tab, configure the Slug property, you will see it under “Route Variables”

Let me know if that works for you

1 Like

Please help me and check it out what I do wrong because I have no ideea what I’m missing :frowning:

@KAdrian

You have configured route to /service-explained:slug instead of /service-explained/:slug
Can you update that?

1 Like

done , still acting the same

And last step is to configure the slug for buttons.

So click on the buttons (links) and then go to advanced tab, and set the slug (which is variable slug coming from database).

1 Like

Opera Snapshot_2023-07-26_003840_digitalverse.divhunt.art

do i need to add something to key?

@KAdrian

Have you selected the link button? You should have seen already predefined key “slug”?

1 Like

yes i select it like slug , still any button openins the same page

@KAdrian

Yes, click on that slug under Route Variables and configure value to $value->get(‘slug’), then it should work?

1 Like

Yea I set it now , still not working
Opera Snapshot_2023-07-26_004931_digitalverse.divhunt.art

@KAdrian

Now all the data for single page are available in variable page > data, so you don’t need to set source like this.

So remove source from that tag, and then in Settings tab > content use page variable like this:

Repeat the same process for rest of the tags for that page, so again, don’t use source, you already have all data available inside page > data variable.

1 Like

ok , now is connecting to my blog instead of services , how do i change that?

@KAdrian

This is bug from our end, please don’t have multiple pages opened that has source on them. Unpin/close all pages and only work with one with source so you will see proper variable data.

Because the issue is multiple pages are trying to push their data to variable page > data and there’s conflict.

I’ll fix this tomorrow.

1 Like

It’s working ! :smiley:
I want to thank you so much for your time helping and teaching me ! really appreciate it :smiley:

2 Likes

You’re welcome, we will try to simplify the process in future

3 Likes