Documentation / Tutorials / Awesome Apps
Understanding App Config Collection
/ Awesome Apps / Understanding App Config Collection
When you create an app within Awesome Enterprise, you can create config collection for that app. It allows you to configure various layouts, access rights and settings for that app. Here is a list of slugs that you can create for an app config and it’s purpose.
- Init: this slug is used to execute code whenever an app is initialized.
- Scripts: Allows you to collect app specific scripts and styles to be put in one place, it adds to the core scripts.
- <collection-post_type>-scripts: it will be used only on a single page of the post type specified.
- Header: You can use this to write app specific header layout, you can also call the modules. It will override the default header.
- Footer: It is used to override the default footer.
- single-content-layout: It is used to override the default post types layout.
- Settings: It is used to hold all the settings specific to app. It is saved using custom fields/meta keys similar to core settings.
- Layout: This is equivalent to the custom layout used it the awesome studio. If it is present in the app then it will be used over
- <collection-post-type>-layout: It allows you to create a separate layout for a collection if needed.
- posts-single-layout: It allows you to create the fully custom layout for the app’s default post.
- Rights: This slug is used to manage the access rights of an app. Here is an example of the code that can be used here
[arr.create set='app.rights'] [access mode='logged' unlogged='faqs/tmp-login' title='Login To Samples App'/] [auth a1 method=twofactor_login_authenticator all_roles='credit_appraisal' /] [auth a2 method=single_access_otp all_roles='credit_ops' /] [auth a3 method=vsession] [code raw] [env.set app.auth.status='success' /] [/code] [/auth] [/arr.create]
It shows the example of how rights can be controlled by an app.