Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1421498

    Hi,

    is it possible that editors only see, move and add the custom elements to a page in ALB? All other content-/layout- and media-elements should be invisible. I thought this was possible but I cannot find the settings for this.

    Thanks a lot!
    Thorsten

    #1421593

    Hey ThorstenFB,

    Thank you for the inquiry.

    There is no option for this out of the box. You only can lock the builder elements for non-admins by enabling the Lock Advanced Layout Builder option in the Enfold > Layout Builder panel, but this will also affect the custom elements.

    Best regards,
    Ismael

    #1421601

    Hi Ismael,

    thanks for your reply.

    But I I don’t want lock the custom elements, only the regular elements.
    The custom elements should be available and customizable by editors – the regular elements not.

    It also would be great if it were selectable which elements are shown to editors.

    Best regards
    Thorsten

    • This reply was modified 1 year, 1 month ago by ThorstenFB.
    #1421740

    Hi Thorsten,

    What you are asking for would be considered out of scope of theme support unfortunately, but we’ll consider adding such a function to a future release of the theme.

    Best regards,
    Rikard

    #1421881

    Hi Rikard,

    thanks for your reply. Of course, I understand this but I hope this function will be implemented at some point.

    At the moment my customers (editors) either have too many or too few permissions to make changes to their sites.
    That’s why this function would be great for me and maybe for other users too.

    All the best
    Thorsten

    #1421965

    Hi,

    Thank you for your patience

    Your only option for now is to use the avf_allow_drag_drop filter to adjust which user roles can interact with the builder elements. However, it’s still not possible to restrict access only for CET. Usage examples can be found in the following threads

    // https://kriesi.at/support/topic/shop-manager-user-role-permissions/#post-1370646
    // https://kriesi.at/support/topic/alb-does-not-work-with-user-role-editor/#post-1293830

    Best regards,
    Ismael

    #1436244

    HI Ismael,

    many thanks for your reply. Sorry, I don’t understand it completely. But is it possible with hooks and filters to hide the whole element-tabs in ALB but let authors (f.e.) still have the possibility to drag and drop (move + copy) the elements they are already used on a site?

    Best regards
    Thorsten

    #1436332

    Hi,

    But is it possible with hooks and filters to hide the whole element-tabs in ALB but let authors

    That might be possible. Please add this code in the functions.php file:

    add_filter( 'admin_body_class', function( $classes ) {
        $user = wp_get_current_user();
        $roles = $user->roles;
        $roles_string = implode( ' ', $roles );
        return $classes . ' ' . $roles_string;
    }, 10, 1);
    
    

    Then add this hook to hide the ALB element buttons for specific user roles.

    add_action( 'admin_head', 'ava_custom_admin_css' );
    
    function ava_custom_admin_css()
    {
        if ( current_user_can( 'administrator' ) ) {
            ?>
            <style>
                .administrator .avia-builder-main-wrap .shortcode_button_wrap {
                    display: none;
                }
            </style>
            <?php
        }
    }
    

    The hook above will hide the buttons for administrators. If you want to hide it for authors or editors, you have to adjust the css rule a bit.

    .author .avia-builder-main-wrap .shortcode_button_wrap, .editor .avia-builder-main-wrap .shortcode_button_wrap  {
                    display: none;
                }
    

    Best regards,
    Ismael

    #1436364

    Hi Ismael!

    thank you so much!!! That’s what I’m looking for!
    It helps me a lot. Perfect!!

    Cheers
    Thorsten

    #1436392

    Hi,

    Great, I’m glad that Ismael could help you out. Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.