Need help with RG cards!

Hello! I built out some cards for the various categories in my app using a RG. I have each page built out for each category (accessories, applications, etc).

How do I point each card to a different page in a RG? I have about 30 categories so there is a page for each category.

I am stuck and could really use some help here, THANK YOU!

You can still use the 'Go to page’ action, however as you probable realised you cannot hardcode which page to go to. Scroll to the bottom of the dropdown and select 'Dynamic Page...'

An input field will appear and you will be able to dynamically specify the name of the page.

You will have to make sure that the input coincides with the actual name of the page on your bubble editor. You can either use some regex to remove emojis,and then stuff like trim, lowercase, and find and replace to remove spaces, but you would have to be methodic about your page naming and category naming. Might be best to use an option set which converts from the nice looking front facing text to the page name.

If you actually mean you’ve built a separate page for each of your 30 categories, then do as @nico.dicagno says and use a dynamic page name for each go to page action…

But if you mean you’ve built a single dynamic Category page, populated with different categories from your database (which would make a lot more sense), then you can just ‘send’ the category from the RG cell to the page using ‘Send Data’ current cell’s Category.

1 Like

I do have a separate page for each of the categories…it seems like I should just have one based on your comment but I am not sure how to do that. For the dynamic page, it is giving me an error? Here is what each page looks like and the workflow error:

As @adamhholmes says, the structure of each of your 30+ pages is probably essentially the same, so you should have a single ‘category’ page that has a particular category as a datasource and uses that to show the right products/images/text dynamically.
Having 30 pages to deal with isnt very efficient. If you have to change something, no matter how small, you’ll have to change it in 30 different places.

Unless you are using a reusable element inside every page and just building on the reusable element?

What is Accessories Page? That input requires a ‘text’ input. And that input needs to be the name of the page you wish to navigate to, the name you gave it on the bubble editor.

Wow I feel dumb…I will have to work on creating one page for the category pages. Its data that flows into a Bubble table using an API with Airtable.

The page is the “dashboard” page, but have parameters set up to act as different pages. So when “accessories” is clicked the parameter would be “v=accessories” and bring that up.

Here is the current setup. Not sure if this is something I can fix?

Oh your setup is very workable! Working with parameters works quite well. I thought you had 30 different pages. So your different Category ‘views’ are all on the dashboard page right? Are the parameters being read on page load?

Thank you so much for your help! Correct, all my category views are all on the dashboard page. For example, “V=accessories” , “V=apps” etc…

Each parameter is a conditional “get V from page url is accessories” — is there a way to still dynamically populate these pages from the RG cards?

Yes absolutely.
You can still use the ‘go to page action’ and set the destination to Dashboard. Check ‘send more parameters to the page’, set ‘V’ as the key and send the appropriate text as the parameter.

As i mentioned before, the trick is making sure you are sending the correct value for the parameter; it needs to be exactly the one you are checking for in this conditional, otherwise it will not work.

Hm. Maybe I am a bit confused…how do I set that up in the repeating group to dynamically go to each category page? I can do what you said above, but then each RG card will go to the accessories page?

Sorry if I am missing something :sweat_smile:

You need to use a dynamic expression and figure out a way to send the parameter corresponding to the card that was clicked on. It would have to use ’ Current cell’s…’ in order to work right.

What is the data source of your repeating group?

I would personally use an option set as the datasource. This option set (lets call it cards) would have fields for all the things you are displaying on the repeating group (text, icon, image) as well as a field for the parameter name. You would then use ‘Current cell’s option’s parameter name’ for ‘v’.

The data source is an option set which is just a list of the categories!

Are you saying set up a new option set that would be the parameter name? I am not following that part and may be a bit advanced for me :upside_down_face:

1 Like

Perfect! Thanks for the screenshots. Click on Create a new attribute. This would essentially create a new field on the Option Set, so you can add more data to each option.

You could call it something like ‘navigation id’ and it would be of type text.

For each option, click on ‘modify attribute’ and manually enter the parameter you are checking for on the dashboard’s page load.
ie Accessories → accessories, Alcohol → alcohol etc…

Then on the workflow you can use ‘Current cell’s, Categories, navigation id’ as the parameter for ‘v’

WHOA!!! That is some wizardry right there…worked like a charm! Thank you SO much :saluting_face:

1 Like