How do i link the navigation

Permalink
Hello guys,

C5 is greate and i have my first theme up and running. What i just dont understand is how i actualy link the navigation bar or make it editable?

Best Regards,
Cedric

 
cannonf700 replied on at Permalink Reply
cannonf700
not sure what you mean?
If you coded your theme correctly there should be an editable where you want your navigation to go. Click it, add a 'auto-nav' block and you should be on your way.

Can you post the code you used in your template?
wingmedia replied on at Permalink Reply
Here is how my navigation looks like in the theme. I tryied with getthemepath as you se. But that is wrong. How should i put the code?

<li><a href="<?=$this->getThemePath()?>/default.php" class="active"><span>Hem</span></a></li>
          <li><a href="<?=$this->getThemePath()?>/about.php"><span> Om oss</span></a></li>
          <li><a href="services.html"><span>Tjänster</span></a></li>
          <li><a href="referenser.html"><span>Referenser</span></a></li>
          <li><a href="contact.html"><span> Kontakt</span></a></li>


Best Regards,
PauloCarvalhoDesign replied on at Permalink Reply
PauloCarvalhoDesign
Why dont you use the autonav block?
wingmedia replied on at Permalink Reply
Becouse the layout of the menu changes when i do that... But how do i get the menu to be editable?

Regards,
PauloCarvalhoDesign replied on at Permalink Reply
PauloCarvalhoDesign
You can style your auto-nav block as you like.
you can add a custom template with custom css.
PauloCarvalhoDesign replied on at Permalink Reply
PauloCarvalhoDesign
PauloCarvalhoDesign replied on at Permalink Reply
PauloCarvalhoDesign
Any luck?
wingmedia replied on at Permalink Reply
I understand the basics but dont know how i make the navigation as a block in the src code. In all the content i use
<?php
   $a = new Area('Main Content 2');
   $a->display($c);
?>
but in the links i dont know how i should put it.
cannonf700 replied on at Permalink Reply
cannonf700
Try this:
<li><a href="<?php echo $this->getThemePath()?>/default.php" class="active"><span>Hem</span></a></li>
          <li><a href="<?php echo $this->getThemePath()?>/about.php"><span> Om oss</span></a></li>

etc...
wingmedia replied on at Permalink Reply
Tried that erlier also didnt work :(

How guys have you made your menus in the src code?
PauloCarvalhoDesign replied on at Permalink Reply
PauloCarvalhoDesign
I still cant understand why you cant use the auto nav block!
cannonf700 replied on at Permalink Reply
cannonf700
like this:
<div id="topnav">
      <ul>
        <?php
        $a = new Area('Header Nav');
        $a->display($c);
      $a->setBlockLimit(1);
        ?>
      </ul>
    </div>


and also with out the <ul> like this:
<div class="main-nav-holder">
                   <?php
            $headernav = new Area('Header_Nav');
            $headernav->display($c);
            ?>
         </div>
wingmedia replied on at Permalink Reply
When im using
<?php
        $a = new Area('Header Nav');
        $a->display($c);
      $a->setBlockLimit(1);
        ?>
i can add auto nav and the links are working. But have som trouble to get the same layout as i had in the HTML. It finds all the stylesheets and so on.

Check this image outhttp://imageshack.us/photo/my-images/40/39052942.jpg/...

You se wich is original html and C5.

Regards,
PauloCarvalhoDesign replied on at Permalink Best Answer Reply
PauloCarvalhoDesign
All you need to do now is to view the source and find the class of the UL in that navigation.
Should be .nav, depending on the template or not.
However the best you should do is find you autonav block folder in concrete folder.
Copy into blocks folder at the upper level making you block override the core one.
In the view of you auto-nav change the class of the ul to suit your needs.
You have a class available to you .nav-selected for the active links.
But you can change all of that if needed.
If you need a template let me know an I will give you one!
wingmedia replied on at Permalink Reply
Thank you will try this, but also thanks to cannonf700 !

Have a nice one !

Regards,
cannonf700 replied on at Permalink Reply
cannonf700
Also,
Concrete5 uses this .css class to style the current page.

li.nav-selected a

This will put the "tab" on the current page.
wingmedia replied on at Permalink Reply
Now i have made this changes. But it wont read my css settings.

http://imageshack.us/photo/my-images/217/77316298.jpg/...

Best Regards,
PauloCarvalhoDesign replied on at Permalink Reply 1 Attachment
PauloCarvalhoDesign
I have uploaded a simple template for you to sort this out once and for all.
Unzip it and copy the autonav folder into your blocks folder.
Now in your edit mode click in autonav block choose templates and pick my template.
In your favorite text editor open the file view.css located in autonav/templates/my template/view.css

Add your css there.
Remove all css that you may have inserted using the designer block you dont need it.
wingmedia replied on at Permalink Reply
Thank you for the file ! I realy appreciate it.

Now i have done it. The template is in blocks/autonav/templates/my template/ and i have change the view.css but dont i need to move the view.css to another directory? Dossent seem like it reading the .css file.

Best Regards,
C5LABS replied on at Permalink Reply
C5LABS
No, your view.css should be in the same level as view.php.
wingmedia replied on at Permalink Reply
All right, any ide why its not reading the file?
PauloCarvalhoDesign replied on at Permalink Reply
PauloCarvalhoDesign
I remember frm a screenshot of yours that your where customizing the block with the design tool correct?
Make sure that your css that you have implemented there is deleted.
Alternatively use firebug to see if there are rules overriding you view.css
wingmedia replied on at Permalink Reply
Yes i have deleted it and its cleen now, will check in firefox :)
wingmedia replied on at Permalink Reply
I had 4 view.css files after checking in firefox. And one style.css that is located in my /themes. After removing all the other .css files the site now looks different and the menu is still wrong. Any ides guys?

Best Regards,