-
AuthorPosts
-
January 25, 2012 at 4:40 pm #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
Nicoandbeyond Friendandbeyond
- Join date:
- November 2011
- Posts:
- 55
- Downloads:
- 4
- Uploads:
- 0
- Thanks:
- 19
- Thanked:
- 8 times in 1 posts
December 21, 2012 at 1:09 pm #477086Did you solve this problem? I’m having the same problem.
December 21, 2012 at 2:59 pm #477096Hi,
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.phpHope it helps
1 user says Thank You to nico76 for this useful post
andbeyond Friendandbeyond
- Join date:
- November 2011
- Posts:
- 55
- Downloads:
- 4
- Uploads:
- 0
- Thanks:
- 19
- Thanked:
- 8 times in 1 posts
December 21, 2012 at 11:06 pm #477124Thank 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.
December 22, 2012 at 10:21 am #477195yes, 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 Friendandbeyond
- Join date:
- November 2011
- Posts:
- 55
- Downloads:
- 4
- Uploads:
- 0
- Thanks:
- 19
- Thanked:
- 8 times in 1 posts
December 22, 2012 at 1:22 pm #477220I’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 528So 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.December 22, 2012 at 2:26 pm #477227hmm, 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 Friendandbeyond
- Join date:
- November 2011
- Posts:
- 55
- Downloads:
- 4
- Uploads:
- 0
- Thanks:
- 19
- Thanked:
- 8 times in 1 posts
December 24, 2012 at 8:36 pm #477437I 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.:)
December 24, 2012 at 8:56 pm #477438just add
php_flag display_errors off
to your .htaccess file.That should disable php warnings and notices.
Merry xmas
-
AuthorPosts
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