Say, I have a nested display like below:
- I need a tab / menu for pages
- I need a page to show up categories
- Upon selected a category, it’ll show up a item detail page, with side navigation
- Upon clicking side navigation, the item to display on the right side need to be changed accordingly
For 1 and 2, I can make it in Glide Apps. However when it comes to side navigations, I have no idea how to achieve it via the components.
Any suggestions?
P.S. the Section 2 and Section 3 could be in the same URL, or not.
As one of the paths you can take:
- Create 2 USC columns in the user table: a “Category” column and an “Items” column.
- Image 1: Go back to your “view items” tab. Use the Collection component that functions as a button to which you can assign the action of setting the column value to the Category column. Set its visibility to be visible if the Category column is empty.
- Image 2: Add containers according to the number of menu items you have and set their visibility according to the category and menu item name chosen by the user, whether it’s item 1, item 2, and so on. Use the “Choice” component on the left as the item buttons and assign the action of setting the column value to the corresponding menu name in the “Items” column.
- Don’t forget to add a Back column to return to the first image view, which of course involves an action to clear the existing selection.
- Adjust the column size (CSS) so that all button displays are vertical.
What I can’t imagine is how it will look on mobile, which you haven’t explained.
3 Likes
Thanks!!! Works like a charm.
The only problem remains is that it could not be used by anonymous user anymore (which cannot record their viewing category/items).
And mobile layout is the missing part of customers need, not a big deal to me so far.
This is what I thought. Try using the following code in your custom CSS. At least it won’t ruin the display on your phone by having your menu button on top instead of on the side.
Give the class name to your container: vertical-button.
#page-root:not(:has(.mobile-layer)) .vertical-button .oneToTwo {
grid-template-columns: 100px 1fr;
}
1 Like
I think @Darren_Murphy knows more about this problem.
@Samuel.Chou.OM can you clarify what you mean by anonymous user please?
Do you mean users that are not signed in to your App?
Or do you mean users that are signed in, but their emails are anonymised?
1 Like
Sorry for confusion. By saying “anonymous user”, I mean those who is not registered on the User table (where my USC column of storing category/item viewing works).
Which means (the side navigation function of) the app could not function well if being public.
It’s possible. You need to create a separate table to hold the user specific column. Then in every other table that is attached to a screen, you need a single value column to use to get/set the value in the user specific column.
1 Like
yeah, I tried that before. However the structure does not allow me to do that:
- In “Section 1” I showed a collection of categories, and lead the click to view the detail screen of each categories, as “Section 2”.
- Upon “Section 2” (Detail of category) left side, collection of “Items”, about action of “Set column values”, I could only set values of either “User Profile” or “This item (item)”, like screenshot below.
- Upon “Section 2” (Detail of category) right side, I could only display property from either “User Profile” or “This item (category)”.
Considering 2 & 3, making that it is impossible to pass values / properties between collection & display component in the same page, except via the User table.
If you add a Single Value->Whole row column that targets the table where the User Specific value is stored, you will be able to set the value through that column.
Sorry, not quite understand what do you mean. Can you elaborate it more?
Like, what exact column should I put in which table in Data? Considering I’m having 3 tables right now: Category, Item, User table.
You could put the single value whole row in the user profile table.
Then in your set column screenshot instead of ‘this item’ you would choose user profile → single value whole row
You need the Single Value column in each table that is connected to a screen.
The column type is Single Value.
In the configuration, “Get” should be First, and “From” should be the table where the User Specific column is, and “Whole row”.
Like this:
@Eric_Penn a solution is required that works for visitors (ie users not signed in), so the User Profile row is not an option.
@Darren_Murphy it does work for visitors though. I understand there’s no official documentation but if you single value something from another table into user profile or you use single value whole row from user profile…it all works… visitors or not
3 Likes
oh, interesting. mmm, yes now I recall you mentioning that before. I’ve never actually tried it myself because I almost never work without User Profiles enabled.
1 Like
Ya it would be nice if there was something official because it cuts down on a lot of clutter.
Is this a miracle or featured from the user table, Eric?
I can tell you it’s worked for me for 2 years.
If there was something in writing from Glide then pros like Darren and Jeff would recommend this approach.
I think the fact it works is not enough to recommend… they want to know why it works… to which I could only speculate
1 Like