Two column menu

Permalink
Hi! Is there a way, in Concrete5 or CSS that can split up a single menu into two? See my current website here;
http://www.balticjazz.com/ (to the right in the brown area)

There it's coded with separate <ul>'s.

Thanks.
alejandro

 
Remo replied on at Permalink Reply
Remo
you can create a custom template for sure.

count the li's on the top level and insert an additional </ul><ul>..

if you know how to create a custom template this is fairly easy to do.
xandre replied on at Permalink Reply
I know how to modify custom templates but I have no clue how to get it to split the menu in two :(
Remo replied on at Permalink Reply
Remo
some pseudo code:

$c = 0;
foreach..
{
  if ($level == 0); $c++;
  if ($c == 5) {
    echo '</ul><ul>';
    $c = 0;
  }
}
xandre replied on at Permalink Reply
Works wonders but it gets messed up (doesn't work at all) with my "check-if-link-is-active"-function.

Error message:

Fatal error: Call to a member function getCollectionPath() on a non-object in
Remo replied on at Permalink Reply
Remo
How can I know what the problem with your custom function is when I can't even see it??

You aren't working on a real collection object that's what causes the problem but why you don't have a collection object is another story
c5mix replied on at Permalink Reply
You should be able to just do this with css and no modification to the nav block. Just put a width on the <ul>'s, a width on the <li>'s half the width of the <ul> (minus any margins) and float the <li>'s left. this will form 2 columns.

So, the code would look something like this:
ul {width:200px}
li {width:80px; float:left; margin-right:15px)


you might have to put a height on the ul too.
Remo replied on at Permalink Reply
Remo
yeah but don't you get a different order that way? 1 left, 2 right, 3 left, 4 right instead of 1 left, 2 left, 3 right, 4 right
xandre replied on at Permalink Reply
Nailed it by setting the <li>'s width to 50%. Remos code worked wonders too despite that nav-selected stopped working :(

The problem with links coming in wrong order was easy to fix in Sitemap.

The final result
http://balticjazz.icedriven.org/en/...


Thank you so much :D