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
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
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?
Best Regards,
<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,
Why dont you use the autonav block?
Becouse the layout of the menu changes when i do that... But how do i get the menu to be editable?
Regards,
Regards,
You can style your auto-nav block as you like.
you can add a custom template with custom css.
you can add a custom template with custom css.
Take a look at this:
http://www.concrete5.org/documentation/general-topics/custom-templa...
http://www.concrete5.org/documentation/general-topics/custom-templa...
Any luck?
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 but in the links i dont know how i should put it.
<?php $a = new Area('Main Content 2'); $a->display($c); ?>
Tried that erlier also didnt work :(
How guys have you made your menus in the src code?
How guys have you made your menus in the src code?
I still cant understand why you cant use the auto nav block!
like this:
and also with out the <ul> 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>
When im using 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,
<?php $a = new Area('Header Nav'); $a->display($c); $a->setBlockLimit(1); ?>
Check this image outhttp://imageshack.us/photo/my-images/40/39052942.jpg/...
You se wich is original html and C5.
Regards,
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!
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!
Thank you will try this, but also thanks to cannonf700 !
Have a nice one !
Regards,
Have a nice one !
Regards,
Also,
Concrete5 uses this .css class to style the current page.
li.nav-selected a
This will put the "tab" on the current page.
Concrete5 uses this .css class to style the current page.
li.nav-selected a
This will put the "tab" on the current page.
Now i have made this changes. But it wont read my css settings.
http://imageshack.us/photo/my-images/217/77316298.jpg/...
Best Regards,
http://imageshack.us/photo/my-images/217/77316298.jpg/...
Best Regards,
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.
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.
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,
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,
No, your view.css should be in the same level as view.php.
All right, any ide why its not reading the file?
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
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
Yes i have deleted it and its cleen now, will check in firefox :)
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,
Best Regards,
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?