Folder/App Structure in retoolContext

Would it be possible to make the org folder/file info available within apps? We have a nav feature that groups apps by folder and currently we're just updating a JS file in our nav module to do so. If we could access nested objects to do this it'd simplify the process a ton.

It would be nifty to have a "Use organization structure" toggle in the Retool nav component as well, with maybe an option to mark certain folders or apps as not active.

Thanks!

Hey @kschirrmacher! Just wanted to clarify before filing thisβ€”are you interesting in simply having access to the folder name within in app or do you want to be able to see all apps/folders or something else?

If the first, would something like this work for you to grab the folder name?

{{ retoolContext.appName.split('/')[0] }}

This grabs the appName, which includes the folder name then a slash then the app name, splits the appName property into the folder name into [folder name, app name]. Then we grab the first element, which is the folder name!

Hey Victoria,

My ideal scenario would be having access to all folders and apps from a given app so that we can render our nav menus dynamically as apps are added to the organization.

Thanks!

1 Like

Thank you for clarifying! Filed :slightly_smiling_face: Will keep this thread updated

2 Likes

Hey Victoria, just checking in on this one. I noticed that the new API exposes the folder structure which is great, any plans to make apps available as well? This would take care of my need without using retoolContext.

+1

1 Like

Hey Kyle! Great point. Requests for a Retool API endpoint to access the current app and all apps have both been filed.

3 Likes