top of page

Hide Sections on Specific Dynamic Pages



Velo Code:


$w.onReady(function () {
    
    $w("#dynamicDataset").onReady(() => {
        let project = $w("#dynamicDataset").getCurrentItem();

        if(project.one===true){
            $w("#one").show();
            $w("#one").expand();
        } else {
            $w("#one").hide();
            $w("#one").collapse();
        }

        if(project.two===true){
            $w("#two").show();
            $w("#two").expand();
        } else {
            $w("#two").hide();
            $w("#two").collapse();
        }

        if(project.three===true){
            $w("#three").show();
            $w("#three").expand();
        } else {
            $w("#three").hide();
            $w("#three").collapse();
        }
    });
});

Enjoy!

Commenti


bottom of page