Hi all, have a bit of a technical question.
Context: I have a datatype called “lists”. I also have a page called “lists” with the URL “xxx/lists”. The lists page has “lists” as type of content and I can thereby alter the custom URL to e.g. “xxx/lists/list1” which works. I want the lists page to be an overview of all lists. Thus if you are directed to the lists page it shouldn’t contain the data of any particular list and it should only include the URL “xxx/lists” thus not any sub-URL such as “xxx/lists/list1”.
The question: How can I create an overall page called lists (which should not be datatype = “lists” as it should contain a repeating group of all lists) AND subpages under the “lists” subdomain that are dataype = “lists”?
Thanks in advance!
1 Like
@ALB
There are two approaches. First to ignore this concept
You can create the page with the content type set to Lists. In order to send data as mandatory from Bubble when the page content type is set, if you do not want an actual database value sent and for the current page thing to be empty, as would be needed to load all lists in the repeating group, you can have on the User data type a data field called ‘empty list’ and be of type list.
In that scenario, every user will by default have a data field of type list, that you never populate with a value, thus leaving it empty. This allows you to use the current users empty list field as the data to send on go to page workflow actions. The action works and the page will be loaded with an empty current page list thing.
Then on the RG just put a condition ‘when current page thing is empty’ and use the property to change as the datasource and set that datasource to a search for all lists.
The second option is to not use the page content type thing and to do a lot more work to extract the necessary values from the URL and to use the go to page action with data to send as text in the format you want your URL to be…this is more complicated and takes more time to setup. I use this in my apps for multi-language apps that require SEO in all languages as well as these pages having more than one content type (ie: list of results and specific result shown on same page)…needless to say it is a very complex setup that I would not do for the desire of just showing in a single language a page that can be a list of results or a single result.
1 Like
Thanks for the in depth answer!
1 Like