Multiple Navigations

Permalink
Hey there,
I have a very special question: at the moment I'm building my first website using C5 and really like the way it works. I built the site from scratch using HTML and am now converting it into a theme.

The problem is: the site has multiple navigations, it structured like this:

Main Nav 1
-> Subnav 1
-> Subnav 2

Main Nav 2
-> Subnav 3
-> Subnav 4

Main Nav 3
-> Subnav 5
-> Subnav 6

Main Nav 4
-> Subnav 7
-> Subnav 8

The first subnav is always the same as it's parent Main Nav element. The Main nav is static so I hard coded it, but I would love to be able to add more Subnav elements later without touching the HTML block (because several people will be using the site).

I already read through the forum, Google and also bought a great book about C5-Theme-Building without any solution. Hope you can help me!

 
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
There is no need to use html blocks. You can use Autonav blocks. If you think that the html is little different than the Autonav block, then you can use Custom Templates to do so.

Rony
mlmedia replied on at Permalink Reply
Thanks for the answer!

I really don't have a problem using HTML do implement the four Main Nav parts in the header, I just would love to use autonav blocks in a sidebar of each site to show a different subnav and don't see how to do this.
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
What does it mean?
mlmedia replied on at Permalink Reply
Yeah sorry, it's kind of hard to explain.
My site looks like this:

Horizontal Main Nav with 4 elements.
Under this Main Nav is the content area and left of the content area a sidebar showing several Subnav elements.

What I would like to get is:
Creating different navigations in this sidebar depending on what Main-Nav site you are.
mlmedia replied on at Permalink Reply 1 Attachment
Here is a scheme of what the site looks like ( more or less ;-) ) and what I want to achieve.
ronyDdeveloper replied on at Permalink Best Answer Reply
ronyDdeveloper
Okay so here is the process.

1. You are in Main 1 page. On the Left side, you have an editable area where you can add blocks. You need to add block called "Autonav".
The options will be like:

a. Pages Should Appear: In their Sitemap Order

b. Display Pages: Beneath a particular page
then choose the Main 1 page from "Select Page" link.

c. Sub Pages to Display: None

d. Sub-Page Levels: Display sub pages to current.

You need to do the same for Main 2, Main 3, Main 4 respectively.

Hope this helps.

Rony
mlmedia replied on at Permalink Reply
Thank you very much!
Will try my best to get this working, also found this:http://www.concrete5.org/documentation/how-tos/editors/primer-auto-...

...going to work this out and will write when it worked or not.
mlmedia replied on at Permalink Reply
Allright,
it starts working - thank you very much!

Now there are just two problems left:

#1: In the Main Nav there is a button called "Home" which I would love to exclude. The "Home" link should be in the logo of the site.

#2: The different Sub Navs work now, I always get the subpages of the Main Nav element, but I want to add the Main Nav link as the first Sub Nav Element on each Sidebar. Looking at the scheme I attached earlier this means: "Sub 1" is the same link as "Main 1", "Sub 5" is the same link as "Main 2" - is there a chance to do this? Looking at the Auto-Nav configuration it always tells me to start beneath the special element but this doesn't include it.

If those two problems are solved everything works as planned. Again: Thank you very much for helping a newbie loving C5!
JohntheFish replied on at Permalink Reply
JohntheFish
You can add an 'excude from nav' attribute to pages you want left out of an autonav.
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
You can add a page beneath main Nav called Sub nav 1 and put an external link of the main nav.

Rony
JohntheFish replied on at Permalink Reply
JohntheFish
From a general site management point of view, rather than repeat these sub-nav blocks on every page, see:

http://www.concrete5.org/documentation/how-tos/designers/show-conte...
mlmedia replied on at Permalink Reply
Yay!
Thank you very much! You two are my new super heroes!
Coming from WP and Typo3 some things are just pretty new to me, but your advice really helped me a lot! Gonna get this working now - just some other (most of all jQuery) fixes and the site will be up and running!

Great community support, impressed!

By the way: is there a reason why non of my jQuery stuff works since I moved from HTML to C5?
The lower end of my <head> section inside the header.php looks like this:

<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
   <script src="<?php echo $this->getThemePath() ?>/js/jquery.flexslider-min.js"></script>
<script type="text/javascript" charset="utf-8">
 $(window).load(function() {
  $('.flexslider').flexslider({
    animation: "slide",
    controlNav: false,
    slideshowSpeed: 3800,
  });
});
</script>  <script src="js/libs/modernizr-2.5.3.min.js"></script>
<?php Loader::element('header_required') ?>
</head>
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
You are not supposed to add a Jquery library as C5 by default has its own.
Just remove this.
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>


It will work.

Rony
mlmedia replied on at Permalink Reply
Indeed!
The more I learn about C5 the more I like it :D
I also had to put
<?php Loader::element('header_required') ?>


above

<script src="<?php echo $this->getThemePath() ?>/js/jquery.flexslider-min.js"></script>
<script type="text/javascript" charset="utf-8">
 $(window).load(function() {
  $('.flexslider').flexslider({
    animation: "slide",
    controlNav: false,
    slideshowSpeed: 3800,
  });
});
</script>  <script src="<?php echo $this->getThemePath() ?>/js/libs/modernizr-2.5.3.min.js"></script>


and now most of the stuff works pretty good. One of the smartest CMS I ever used.