Hide App Header on a Certain Page

Hi, I’m trying to hide the App Header, but only on a certain page.
Does anyone have any code to achieve this?
Cheers

Hello Craig,

Try the below code and add screen id according to your screen.

var scenes = [“scene_123”,“scene_11”,“scene_22”,“scene_33”,“scene_44”]

$(document).on(‘knack-scene-render.any’, function (event, scene) {

var key = scene.key;

if (scenes.indexOf(key) >= 0) {
    $("#kn-app-header").hide();
}
else {
    $("#kn-app-header").show();
}

});

Regards,
Sunny Singla
ssingla1985@gmail.com
+919855089359

1 Like

Thanks Sunny.
Worked a treat.
Much appreciated!

1 Like

Is this code now deprecated? I cant get it to work in 2024 :slight_smile:

Still working fine for me …

That what I have on a demo app with 1 page scene_1 and it seems to ignore it?

var scenes = ["scene_1"];

$(document).on('knack-scene-render.any', function (event, scene) {
    var key = scene.key;

    if (scenes.indexOf(key) >= 0) {
        $("#kn-app-header").hide();
    } else {
        $("#kn-app-header").show();
    }
});

Micheal can you check is that id"#kn-app-header" exist or not?

May be you are using a app with different setting .

Thanks