Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • Slawomir Stanczuk Friend
    #1054509

    Hi, im trying to delete off-canvas button from few pages of the site, i can easily disable it in template options, but once i done it it goes off from every single page of my website! Thats because this addon disable/enable switcher is global and it changes every site. My question is how to turn off global setting of your template, not joomla settings, not something else but your template global settings. It doesnt make sense like why theres a assignment lap if its totally usless coz one settings overrides another and we cant fix it?
    PS Could you please look at my last topic, there is another template bug and nobody answered me
    https://www.joomlart.com/forums/topic/homepage-sidebar-problems/

    Saguaros Moderator
    #1054609

    Hi Slawomir Stanczuk,

    Yes, it’s Global Configure in template and it would affect all pages which are using.

    If you want to hide off-canvas button in specific pages, you can use css as below:

    • Go to file: [root]/templates/ja_social_ii (your default template)/css/custom.css (create this file if it doesn’t exist)
    • Add this css rule:
      .disableCanvas .off-canvas-toggle { display: none !important; }

    Then navigate to the backend settings of menu item of page you want to hide > Page Display tab > add disableCanvas in page class option: http://prntscr.com/g65wql

    Hope this helps.

    Slawomir Stanczuk Friend
    #1055905
    This reply has been marked as private.
    Saguaros Moderator
    #1056453

    Another way is that you edit the code so it doesn’t load the off-canvas block.

    1) Clone this file: root/templates/ja_social_ii/tpls/blocks/header.php

    so you will have a new file called: root/templates/ja_social_ii/tpls/blocks/header-no-offcanvas.php

    2) Open the new file: root/templates/ja_social_ii/tpls/blocks/header-no-offcanvas.php , at approx line 77, comment / remove this snippet of code:

    <?php if ($this->getParam('addon_offcanvas_enable')) : ?>
    <?php $this->loadBlock ('off-canvas') ?>
    <?php endif ?>

    3) Open the file layout file of template style you use on pages you don’t want to load off-canvas. For example, if you’re using default layout, open the file:

    root/templates/ja_social_ii/tpls/default.php

    You will see this line of code:

    <?php $this->loadBlock('header') ?>

    change it to:

    <?php $this->loadBlock('header-no-offcanvas') ?>

    P/s: In case that you’re also using ‘default’ layout in the pages which you want to show off-canvas, you can simply clone ‘default’ layout (clone the ‘default.php’ file and rename it) and load ‘header-no-offcanvas’ block as above

    Hope this helps.

    Slawomir Stanczuk Friend
    #1056793

    It works, thanks for your help, i have one more question. Im getting this note – Block [header-no-offcanvas] not found! on pages i disabled it, how can i remove this communicate ?

    Saguaros Moderator
    #1056936

    You created this file already? root/templates/ja_social_ii/tpls/blocks/header-no-offcanvas.php

    You can share the credentials of your site and the page I can see that message so I will take a look.

    Slawomir Stanczuk Friend
    #1056944
    This reply has been marked as private.
    Saguaros Moderator
    #1057101

    I don’t see the file: root/templates/ja_social_ii/tpls/blocks/header-no-offcanvas.php

    That’s why the message ‘Block [header-no-offcanvas] not found!’ appeared.

    Which layout you want to use this new block to hire the off-canvas?

    Slawomir Stanczuk Friend
    #1057139
    This reply has been marked as private.
    Saguaros Moderator
    #1057184

    I updated into the ‘Club2b – Default’ template style with ‘default’ layout.

    You can check it now.

    Slawomir Stanczuk Friend
    #1057187
    This reply has been marked as private.
    Saguaros Moderator
    #1057190

    You’re welcome!

Viewing 12 posts - 1 through 12 (of 12 total)

This topic contains 11 replies, has 2 voices, and was last updated by  Saguaros 7 years, 3 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum