Vertical menu in 2.3.6.5 Mojoportal

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
5/24/2013 11:22:58 AM
Gravatar
Total Posts 6

Vertical menu in 2.3.6.5 Mojoportal

Hi every one I hope that some one here could help me with. please.

I been using Mojoportal 2.3.6.5 since a while...

This is my problem:

I have a page that have a main menu in horizontal header bar Okay...

This page is the parent page of 101 new pages. So this page also have a vertical menu to allow you select the 101 new pages of which it is parent.

So what I did was: a new master.page that share the same structure for the parent and 101 child pages.

But as you can imagine the vertical menu will be too large to use in a simple page.

I created a CSS mod first to limit the height and second to create an scroll bar to allow you select any page you want to view.

Here what I put on CCS style

.art-vmenublock

{

position: relative;

margin: 0 auto;

min-width: 11px;

min-height: 11px;

width: 205px;

height: 550px;

}

.art-vmenublock-body

{

position: relative;

padding: 1px;

width: 200px;

height: 540px;

overflow-x: hidden;

overflow-y: scroll;

}

Everything is fine till here.

In every page that have this vertical menu shows by size limit only the first 19 pages and always shows the first page at the top of menu, so if you need to see the pages in order, like a catalog you that want to see all pages, when you pass the 19 firsts you always will have the first page in the top of the vertical menu, If you want to see the number 50 and you want to see the next one, you'll be forced to use the scroll bar, so I need that the page that you are seeing be the first option at the top of the vertical menu to make the interaction be more intuitive...

My english is not as good as I whish, i'm sorry...

Best regards

Erwin

5/26/2013 7:58:58 PM
Gravatar
Total Posts 6

Re: Vertical menu in 2.3.6.5 Mojoportal

No body... Please I need a path to follow...

 

Thanks you

5/27/2013 7:09:37 AM
Gravatar
Total Posts 2240

Re: Vertical menu in 2.3.6.5 Mojoportal

Hi,

You'll need to use javascript to make the menu scroll up to show the current selected page's menu item. jQuery makes this easy but I don't know what the CSS Class is that is applied to your menu for the currently selected page. If you can find that, I can write the jQuery for you. Also, if you can post a link to your site, helping you is a lot easier.

Thanks,
Joe D.

5/27/2013 8:12:58 AM
Gravatar
Total Posts 6

Re: Vertical menu in 2.3.6.5 Mojoportal

Thanks you Joe.

When you select one item in the menu for example the 50 item, it's staying selected but you need to use the scroll to reach it in the new page loaded

I only use style.css and add this mod to this two class:

.art-vmenublock

{

position: relative;

margin: 0 auto;

min-width: 11px;

min-height: 11px;

width: 205px;

height: 550px;

}

.art-vmenublock-body

{

position: relative;

padding: 1px;

width: 200px;

height: 540px;

overflow-x: hidden;

overflow-y: scroll;

}

This just limit the vertical size and add the scroll bar to my vertical menu.

 

I use jquery 1.7.2 and jqueryui 1.8.11

 

Thanks you very much.

ahhh this is an intranet site...

 

 

 

 

 

5/27/2013 10:03:58 AM
Gravatar
Total Posts 2240

Re: Vertical menu in 2.3.6.5 Mojoportal

Hi,

I understand but what is the class that is set on the LI or A of the menu item which is selected?

Thanks,
Joe D.

5/27/2013 10:21:02 AM
Gravatar
Total Posts 6

Re: Vertical menu in 2.3.6.5 Mojoportal

whoa....

 

<li class="active>

<a class="active>

in this case is been used by several classes in the style.css

Hope this is it what you're asking me...

 

Thanks Joe

5/27/2013 11:11:01 AM
Gravatar
Total Posts 2240

Re: Vertical menu in 2.3.6.5 Mojoportal

Hi,

Give this script a shot. You might need to tweak it but it will get you going in the right direction.

$(document).ready(function() {
  $('.art-vmenublock-body').animate({
   scrollTop: $('.art-vmenublock-body li.active').offset().top
  }, 2000);
});

HTH,
Joe D.

5/27/2013 11:15:07 AM
Gravatar
Total Posts 6

Re: Vertical menu in 2.3.6.5 Mojoportal

Thanks you very much Joe.

I'll update you in a few minutes.

Best regards

5/27/2013 1:30:28 PM
Gravatar
Total Posts 6

Re: Vertical menu in 2.3.6.5 Mojoportal

Joe thanks you very much....

$(document).ready(function() {
  $('.art-vmenublock-body').animate({
   scrollTop: $('.art-vmenublock-body li.active').offset().top -300
  }, 2000);
});

 

Just add the -300 to your code and work just as I whist to...

 

You're the best Thanks you again.

Best regards

Erwin

You must sign in to post in the forums. This thread is closed to new posts.