Hide Knack Logo and Crumbtrail on Specific Page

Hello,

I’ve tried several methods to hide a Knack logo and crumbtrail on a specific page. The individual page is a child page of a parent page with only one view.

I was able to hide the backlink successfully via the following CSS code:

div#kn-scene_151 div.kn-view.kn-back-link > a {display:none;}

I’m under the impression that JS may be the only way to accomplish hiding these links on a specific page, and I’ve tried the following examples without any success:

$(document).on('knack-scene-render.scene_151', function(event, scene) {
  document.querySelector("#knack-logo > a").hide();
});
$(document).on('knack-scene-render.any', function (event, view, records) {
  if ($("#kn-scene_151").is(":visible") || $("#kn-scene_149").is(":visible")) {
    $(".kn-crumbtrail").hide();
  }
  else {
    $(".kn-crumbtrail").show();
  }
});
$(document).on('knack-scene-render.scene_151', function(event, scene) {
   $(".kn-crumbtrail").hide();
});
$(document).on('knack-scene-render.scene_151', function(event, scene) {
    $('#knack-logo').hide();
});

Please let me know if these work for you or have worked in the past, as well as any tweaks that may have been made.

Thank you!

I was able to do it simply with this:

$(document).on('knack-scene-render.scene_XXX', function(event, scene) {
  $(".kn-crumbtrail").hide();
});
1 Like

Thank you! I made a realisation this morning that any commented code in the JS window will automatically cancel all existing code functionality.

2 Likes