Making conditonal master section by using "_section" attribute

story10

Squiffy has a native attribute, "_section" which is the name of the current section.
We can make a conditional master section using it as the following.
"_section" attribute also can be used in {if:} statement and { }.

[[_A]]:
Go to [[B]](_B)

[[_B]]:
Go to [[C]]

[[C]]:
{if _section=C: Welcome to C}

Go to [[D]]

[[D]]:
Welcome to {_section}


[[]]:
        if(!squiffy.get("_section").startsWith("_"))
        {
                squiffy.ui.clearScreen();  //  @clear
        }

Log in to post a reply.

Support

Forums