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.
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?
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â.
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â