This question is regarding how/when to best use reusable elements with Get Page URL conditions to change a module’s content based on where it is used.
Defining “module” these are sections on the website that provide a layout for different types of content - ie. single column text, two column text with image, two column repeating groups, etc. I believe that Bubble calls these UX components. I’m not using theirs, mine are custom.
For the front end of my site, I’ve created a number of different modules and made them responsive. There are about 12 different modules for different purposes that can be reused throughout the site. I have not made them into reusable elements yet and am wondering if i should.
Example 1: I have one How It Works page. There will be 4 “subpages” in the menu. Clicking the navigation on these submenus sends data to the URL “/howitworks/overview” and the content in the modules updates based on the data in the URL.
This is fairly straightforward since it’s all on one page. Modules are hidden/exposed based on what submenu has been selected and the content loads according to URL conditions.
Example 2: Now I’m doing the same for the Why Us pages. So far, I have created a brand new page then copied and pasted the modules I want for the layout. Conditions based on the URL change the content.
I realize this is not ideal. If I want to change the layout of a single module, now I will have to make those changes to modules on both pages. The site is going to be rather extensive, so it would be way easier to make these reusable elements.
The downsides of the reusable elements… if I populate all the content using URL conditions, that seems like it can also get unwieldy rather quickly. On a page-by-page basis, it’s not so bad. BUT - if i want to use the same module twice on the same page, I don’t see a way for this to work because as far as i know, you can’t use page-based states to dictate what happens with reusable elements. (Maybe I’m wrong?)
Can someone help me define a best practice here or point me to resources that explain how to do this?