• Am trying to build a very detailed instruction sheet on a web page. Realizing that it will not be so welcoming in its full text, wanted to break it down into smaller, expandable pieces using the accordion and spoiler shortcodes in Shortcodes Ultimate. However, in looking at all the examples and solutions folks have been kind enough to post, none of them go deep enough in terms of nesting. Ultimately, would like to have a 4-6 level nested accordion/spoiler. Have tried using the [_su spoiler] codes, but can not seem to get deeper than two levels. How can 4-6 level nested accordion/spoiler be accomplished with Shortcodes Ultimate?

    Thank you for your assistance!
    Mark <><

Viewing 4 replies - 1 through 4 (of 4 total)
  • I think I figured out…!!!

    The solution was somehow hidden behind the workaround in order to get the two level spoiler to work properly. On the WP SU Settings -> Examples, under Advanced Examples on the Nested shortcodes section, it says that to go down a level (i.e. to have a shortcode nested inside another), you should insert an underscore right after the opening and closing tags’ brackets on every sub-level spoiler.
    As you may noticed, this ins’t working as it should, and (as @nightl kindly suggested here: https://www.ads-software.com/support/topic/nested-accordions/) you have to maintain the underscore at the closing tag but to skip the one at the opening tag. So I thought… what’s the difference between base level shortcode and sub-level 1 shortcode coding?…: an underscore added at the closing tag. So I told myself, what if I add a second underscore at the sub-level 2 shortcode closing tag? and… voilá! It worked! ??
    I even tried with a 3 sub-level structure and it works just fine (below is a 3 level working example). I didn’t tried further sub-levels since I don’t need to achieve that on my site, so I’ll left that to you… ??

    Here the working solution:

    [su_spoiler title=”Base level Title” icon=’plus-square-1′ style=”fancy”]
    Some text
    [su_spoiler title=”Sub-level 1 Title 1″ icon=’plus-square-1′ style=”fancy”]
    Some text
    [_/su_spoiler]
    [su_spoiler title=”Sub-level 1 Title 2″ icon=’plus-square-1′ style=”fancy”]
    Some text
    [su_spoiler title=”Sub-level 2 Title” icon=’plus-square-1′ style=”fancy”]
    Some text
    [su_spoiler title=”Sub-level 3 Title” icon=’plus-square-1′ style=”fancy”]
    Some text
    [___/su_spoiler]
    [__/su_spoiler]
    [_/su_spoiler]
    [/su_spoiler]

    Enjoy! ??

    • This reply was modified 7 years, 5 months ago by Ratalinux.
    • This reply was modified 7 years, 5 months ago by Ratalinux.

    Whats about the anchors? Is it possible, that a anchor-link will open multi-level spoilers/accordions? right now it will only open first-level anchors

    e.g.:
    [su_spoiler title=”level 1″ anchor=”level 1″]
    [su_spoiler title=”level 2″ anchor=”level 2″]
    [_/spoiler]
    [/su_spoiler]

    href with “#level 1” will open level 1
    href with “#level 2” will not open level 1 or level 2

    Hi,

    Is there a workaround for the multi level spoiler/accordions?
    As in the example above, I want to open a second level anchors.

    Regards,

    Up!

    Any news or workaround?

    Regards,

    Rangdalf

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Deeper Multi Level Accordion and Spoilers’ is closed to new replies.