Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • nico76 Friend
    #173185

    Hello,

    first of let me thank you for this super cool Joomla framework, its really awsome.

    I just came up with a problem that I can’t fix.
    I use the Mega Dropdown and the first sublevel links are group title for the (2nd sublevel) childs.

    The Problem now is that Im not able to have an active class in the a href link on that group title link.

    I hope somebody can help me with that.

    Best Regards
    Nico

    andbeyond Friend
    #477086

    Did you solve this problem? I’m having the same problem.

    nico76 Friend
    #477096

    Hi,

    I attach a file that should add a active class to the span inside group-title.
    It’s a modified version of /plugins/system/jat3/jat3/core/menu/base.class.php

    Hope it helps


    andbeyond Friend
    #477124

    Thank you so much. I will try it out.

    First question, where do I put this file? Do I put it in /plugins/system/jat3/jat3/core/menu/ or do I put it in the template folder in the Blocks Folder or somewhere else.

    nico76 Friend
    #477195

    yes, put it in /plugins/system/jat3/jat3/core/menu/ and rename it back to base.class.php,
    before you do that rename your original base.class.php to save at as a backup.

    I’m not sure if it is possible to overwrite that file via template folder that would be the better way.
    But I think I think for this file its not possible to have a overwrite.

    andbeyond Friend
    #477220

    I’ve uploaded the file. But I’m getting an error message:
    Notice: Undefined variable: test in /var/shared/basix_cms_staging/public_html/basixcms/plugins/system/jat3/jat3/core/menu/base.class.php on line 528

    So I modified line 528 from
    $txt ='<span class=”menu-title ebene’ . $level . $actives . $test.'” >’ . $tmpname . ‘</span><span class=”main-sep”> </span>’;

    To:
    $txt ='<span class=”menu-title ebene’ . $level . $actives . ‘” >’ . $tmpname. ‘</span>’;
    (taking out the .$test)

    This got rid of the error message.

    However I am having trouble getting the active state to work.It is probably that I’m not modifying the CSS properly.

    Your modification to base.php seems to be creating the span class. But I am not sure what bits of the CSS to modify.

    Here is the Html being generated for two group headings.

    <blockquote><li*class=”mega group headinglevel2″>

    <div*class=”group”>

    <div*class=”group-title”>

    <a*id=”menu4971″*class=”mega group headinglevel2″*title=”Landscape”*href=”/basixcms/water-help/landscape.html”>
    <span*class=”menu-title ebene1 active “>Landscape</span>
    <span*class=”main-sep”></span>
    </a>
    </div>

    </blockquote>

    <blockquote>
    <div*class=”group”>

    <div*class=”group-title”>

    <a*id=”menu4991″*class=”mega group”*title=”Private dams”*href=”/basixcms/water-help/alternative-water-sources/private-dams.html”>
    <span*class=”menu-title ebene1 active “>Private dams</span>
    <span*class=”main-sep”></span>
    </a></blockquote>

    Can you give me any advice?
    Thank you.

    nico76 Friend
    #477227

    hmm, do you have a link to the page?
    Is it that, that every of your group title links has a span active class to it whether it is active or not?

    anyway the css would look like eg. this:

    .ja-megamenu .group-title .menu-title.active {
    color: #003366
    font-weight: bold!important;
    }

    andbeyond Friend
    #477437

    I managed to the CSS working (thanks to your advice) and the active states are working in the template where I am using the megamenu. Absolutely brilliant, thank you!

    BUT I’m using a two templates on this site and they use different styles of menu. In template1 I am using the megamenu. In template2 I am using the dropdown menu.

    The base.class.php is working in Template1. But in template two when you hover over menu items (level2/3 and below) or go to menu items below level three I get the following error messages repeated all over the menu/page:

    <blockquote>Notice: Undefined variable: actives in /var/shared/basix_cms_staging/public_html/basixcms/plugins/system/jat3/jat3/core/menu/base.class.php on line 528</blockquote>

    and

    <blockquote>Notice: Undefined property: stdClass::$parent in /var/shared/basix_cms_staging/public_html/basixcms/plugins/system/jat3/jat3/core/menu/base.class.php on line 525

    </blockquote>

    Line 528 is:

    <blockquote> $txt ='<span class=”menu-title ebene’ . $level . $actives . ‘” >’ . $tmpname . ‘</span>’;
    }</blockquote>

    Line 525 is:

    <blockquote>if (JSite::getMenu()->getActive()->parent == $tmp->id) {
    $actives = ” active”;
    };
    </blockquote>

    The only thing I can think of is to overwrite the default base.class.php file by having the changed version somewhere in the template folder but you said before you didn’t think that would work.5t

    Any ideas appreciated!

    Unfortunately I can’t send you a link to the site at the moment as it is on a staging server, it will be going live in a few weeks so I can point you there then, but I hope to have the solution to this problem by then.:)

    nico76 Friend
    #477438

    just add
    php_flag display_errors off
    to your .htaccess file.

    That should disable php warnings and notices.

    Merry xmas

    andbeyond Friend
    #477462

    Thank you, I’ll try that.
    Many thanks and HAPPY CHRISTMAS and a great new year!!!

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

This topic contains 10 replies, has 2 voices, and was last updated by  andbeyond 11 years, 10 months ago.

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