Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1174698

    Hello there,
    I have a toggle to show a large table and I’d like to have a second toggle button (the +/-) at the end of the toggle when it’s open, because else I have to scroll way up to close the toggle via the button. Is that achievable in a simple manner? Or could you lead me there a few steps? Thank you.

    #1175071

    Just an additional thought: If the button could ‘come down’ after some scrolling and then be clickable at the bottom. After click to close it would switch back into position.

    #1175352

    Hi,

    Thank you for the update.

    Where can we see the toggles? Please post the URL of the page.

    If you want to duplicate the toggles, edit the enfold\config-templatebuilder\avia-shortcodes\toggles\toggles.php file and look for this code around line 864:

    $output .= '        <span class="vert_icon"></span><span class="hor_icon"></span></span>';
    

    That is the toggle buttons. You can insert it again after the content, and only display it when the toggle is active.

                $output .= '<div class="toggle_content invers-color '.$inherit.'" '.$markup_text.' '.$colors.' >';
                $output .=					ShortcodeHelper::avia_apply_autop( ShortcodeHelper::avia_remove_autop( $content ) );
                $output .= '</div>';
    

    Best regards,
    Ismael

    #1176379

    Hi Ismael, it’s not that easy. I’m using a workaround now which I’d like to share with you:

    $output .= '<section id="'.$toggle_atts['custom_id'].'" class="av_toggle_section" '.$markup_tab.' >';
                $output .= '    <div role="tablist" class="single_toggle" '.$this->create_tag_string($toggle_atts['tags'], $toggle_atts).'  >';
                $output .= '        <p data-fake-id="#'.$toggle_atts['custom_id'].'" class="toggler '.$titleClass.$inherit.'" '.$markup_title.' '.$colors.' '.$hover_styling_markup.' role="tab" tabindex="0" aria-controls="' . $toggle_atts['custom_id'] . '-container">'.$toggle_atts['title'].'<span class="toggle_icon" '.$icon_color.'>';
    [...]
                $output .=					ShortcodeHelper::avia_apply_autop( ShortcodeHelper::avia_remove_autop( $content ) );
    			$output .= '            <a href="#'. $toggle_atts['custom_id'] . '">back to top</a>';
    			$output .= '            </div>';
                $output .= '        </div>';
                $output .= '    </div>';
                $output .= '</section>';

    but what’s not working is to use toggles.php in a child theme’s folder (rebuilding the structure config-templatebuilder\avia-shortcodes\toggles)

    #1176819

    Hi,

    Thank you for following up.

    You should be able to create a new shortcode path in the child theme directory using the following filter. This will allow you to override existing shortcodes and create custom ones. Please check the documentation below for more info.

    // https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb

    Best regards,
    Ismael

    #1177232

    Thank you for that valuable hint. When you click on the anchor link some click handler seems to intermit so you have a short flickering, though. But the solution is good enough, can be closed.

    #1177416

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Second toggle button at end of toggle’ is closed to new replies.