Hi @worthaz
I similar case in my app designed for mobile. Below is the way I did, hope this is what you need.
Let say you organize your groups as follow:
Group 1
- Sub Group 11
- Sub Group 12
Group 2 - Sub Group 21
- Sub Group 22
You may extentd the structure up to 3,4 layers… and so on no matter how many layer you want to have
Here is the way to navigate across groups, no matter at which layer the group you want to go in an action.
- All groups shall be hidden on page load
- Put custom state on page, let say “view” (text)
- This is the key. Set condition for each group:
"When page’s view truncated by x (layer of the group you want to be visible) is yyy (number of group in the structure)–>this group is visible.
for example
condition for group 2 shall be:
“When page’s view truncated by 1 is 2–>this group is visible”
condition for group 21 shall be:
“When page’s view truncated by 2 is 21–>this group is visible” - To navigate to a certain group you can simply set action in a workflow:
“Set state view of page, va!ue= yy (number of destination group)”
For example as above condition in point 3:
Action to go to page 2:
“Set state view of page, value=2”
Action to go to page 21:
" Set state view of page, value=21"
You can use this action to simply navigate from every group to every other group in you structure, no need to consider the layers.
Additional usefull tips.
Let’s say after navigate from group 11 to group 21, you may want to have simple WF triggered by an element or other WF to navigate back. To achieve this:
- Add addtional custom state for each group= “from” (text)
- Add an action in WF in group 11 to navigate to group 21:
set state from of group 21, value=11 - To navigate back from group 21, simply add action: set state view of page, value=group 21’s from
Hope it can help. Good luck
Anwar