Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • fr1g0s Friend
    #200523

    Hello!
    I need some help..
    I made the position of the module in the sidebar ..
    To do this, I deleted in the file /tpls/blocks/header.php this code –
    <?php if ($this->getParam('navigation_type') == 'megamenu') : ?>
    <jdoc:include type="megamenu" name="sidenav" menutype="<?php echo $this->getParam('sidenav_type', 'sidenav') ?>" />
    <?php else : ?>
    <div class="sidenav-wrap <?php $this->_c('sidenav') ?>">
    <jdoc:include type="modules" name="sidenav" style="raw" />
    </div>
    <?php endif ?>

    and add this

    <?php
    $document = &JFactory::getDocument();
    $renderer = $document->loadRenderer('modules');
    $options = array('style' => 'xhtml');
    $position = 'sidemenuposition';
    echo $renderer->render($position, $options, null);
    ?>

    i hope what everything works good…

    But where i cant add the same thing to display on mobile version?

    Adam M Moderator
    #546081

    Hi,

    I haven’t got your idea yet, please make sure that you follow our instruction to create new module position here.

    fr1g0s Friend
    #546105

    Thanks, corrected the code in the instructions he looks easier. On the big screen, it works ..
    But where do I add the code that would display a mobile version ???


    1. 1
    2. 2
    Adam M Moderator
    #546282

    Hi,

    You can add your CSS code inside media queries to target small screen, for example to target 768px and smaller screen, you can add this code to your CSS file :

    @media all and (max-width: 768px) {
    .... (your CSS code goes here)
    }

    the same concept for 480px and 36px screen.

    fr1g0s Friend
    #546355

    Thank you Adam! I know that in the CSS, you can use styles, depending on the size of the screen …
    But how it will help me in this situation?
    I’ll start from the beginning…

    I need that to module “Hello Me” was displayed in the sidebar on the big screen and on the small …
    So I decided to create a new position.
    To do this, I deleted in the file /tpls/blocks/header.php this code –
    <?php if ($this->getParam(‘navigation_type’) == ‘megamenu’) : ?>
    <jdoc:include type=”megamenu” name=”sidenav” menutype=”<?php echo $this->getParam(‘sidenav_type’, ‘sidenav’) ?>” />
    <?php else : ?>
    <div class=”sidenav-wrap <?php $this->_c(‘sidenav’) ?>”>
    <jdoc:include type=”modules” name=”sidenav” style=”raw” />
    </div>
    <?php endif ?>
    and add this <jdoc:include type=”modules” name=”<?php $this->_p(‘sidemenuposition’) ?>” />

    And on the big screen module displays!
    But if the screen is small the module disappears …
    Why??? Why did he disappear?
    And what should I do, what would it be displayed on a small screen ???

    Adam M Moderator
    #546505

    Hi,

    First, open file root_folder/templates/ja_magz/js/script.js and look for this code :

    //merge side-nav to mainmenu on offcanvas
    if(!$('html').hasClass('no-respon')){

    if(offcanvas.length){
    sidenav.find('.t3-megamenu').clone(true, true).addClass('side-nav-ofc').appendTo(offcanvas.find('.nav-collapse'));
    } else {
    sidenav.find('.t3-megamenu').clone(true, true).addClass('side-nav-nofs').appendTo($('#t3-mainnav').find('.header-menu'));
    }
    }

    then update as below and recheck :

    //merge side-nav to mainmenu on offcanvas
    if(!$('html').hasClass('no-respon')){

    if(offcanvas.length){
    sidenav.find('.t3-megamenu').clone(true, true).addClass('side-nav-ofc').appendTo(offcanvas.find('.nav-collapse'));
    } else {
    sidenav.find('.t3-megamenu').clone(true, true).addClass('side-nav-nofs').appendTo($('#t3-mainnav').find('.header-menu'));
    }
    }

    //add custom sidemenu to mainmenu on offcanvas
    sidenav.find('.cMods-HelloMe').clone(true, true).appendTo(offcanvas.find('.nav-collapse'));

    fr1g0s Friend
    #546775

    Big Thx! it’s work!:D

    fr1g0s Friend
    #546787

    Oh.. no.. :((
    Module is displayed, but after this change is not working exit button …:((


    1. 1
    Adam M Moderator
    #546850

    Hi,

    I have checked your site and see that this button doesn’t work due to JS error. Could you please temporary switch to default theme and recheck then let me know the result ?

    fr1g0s Friend
    #546878

    When I delete this code, Iogout is work.. Help plz..

    Adam M Moderator
    #546905

    Hi,

    In this case, please also provide a temporary FTP account via private reply, I will take a closer look at the code and investigate the problem for you.

    fr1g0s Friend
    #546946

    Thx Adam! JomSocial Support help me..
    here the fixes
    [your test site]/modules/mod_hellome/helper.php line 123
    from
    document.hellomelogout.submit();
    to
    document.getElementById(‘hellomelogout’).submit();
    🙂

    fr1g0s Friend
    #550959

    Hello! Explain to me plz how I can load the search module in the sidebar on mobile devices?

    an example of this code, I can see how it works –

    //add custom sidemenu to mainmenu on offcanvas
    sidenav.find(‘.cMods-HelloMe’).clone(true, true).appendTo(offcanvas.find(‘.nav-collapse’));

    What should I write instead – “.cMods-HelloMe” ?


    1. eee
    Adam M Moderator
    #551107

    Hi,

    You can use this code :

    //add search field offcanvas
    head-social.find('.nav_search_module').clone(true, true).appendTo(offcanvas.find('.nav-collapse'));

    Open custom.css file and add this code :

    #off-canvas-nav .nav_search_module {
    display: none;
    } @media (max-width: 767px) {
    #off-canvas-nav .nav_search_module {
    display:block;
    }
    }

    fr1g0s Friend
    #551226

    Thank you Adam! But it does not work…( + After the change, missing module hellome on mobile devices..

Viewing 15 posts - 1 through 15 (of 21 total)

This topic contains 21 replies, has 2 voices, and was last updated by  fr1g0s 10 years, 1 month ago.

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