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.

    1. Init: this slug is used to execute code whenever an app is initialized.
    2. Scripts: Allows you to collect app specific scripts and styles to be put in one place, it adds to the core scripts.
    3. <collection-post_type>-scripts: it will be used only on a single page of the post type specified.
    4. Header: You can use this to write app specific header layout, you can also call the modules. It will override the default header.
    5. Footer:  It is used to override the default footer.
    6. single-content-layout: It is used to override the default post types layout.
    7. Settings:  It is used to hold all the settings specific to app. It is saved using custom fields/meta keys similar to core settings.
    8. 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
    9. <collection-post-type>-layout: It allows you to create a separate layout for a collection if needed.
    10. posts-single-layout: It allows you to create the fully custom layout for the app’s default post.
    11. 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.

 

Categories
Most Popular

Leave a Reply

Your email address will not be published. Required fields are marked *