Custom 3 link menu on index page
Permalink 1 user found helpful
I'd like to know how you guys make a work around this kind of problem. I have a 3 links custom menu just on the index page. So I put the code in the HTML block.
This is the site without CMS:http://www.letaki.com
And here an attempt to put it on top of C5: demo.letaki.com
Username and pass for both sites are the same: letaki / L3t4k1823
Is there any better solution where every single link should look different?
Tnx and best regards
This is the site without CMS:http://www.letaki.com
And here an attempt to put it on top of C5: demo.letaki.com
Username and pass for both sites are the same: letaki / L3t4k1823
Is there any better solution where every single link should look different?
Tnx and best regards
![ScottSandbakken](/files/avatars/92226.jpg)
I would create a page list template. Add the featured page attribute and also add an image attribute. When adding the block, filter for featured pages. Then, create a custom template that will display the images in an un-order list. Use CSS to display the list in-line and you should be all set.
If you want to be fancy, you can setup a CSS sprite for the page image so that you can include a mouse-over.
Dojo has a couple of page list addons that do thumbnails for menus:
http://www.concrete5.org/marketplace/addons/dojo-page-filter-pro/...
http://www.concrete5.org/marketplace/addons/dojo-folio-slider/...
http://www.concrete5.org/marketplace/addons/dojo-page-filter-pro/...
http://www.concrete5.org/marketplace/addons/dojo-folio-slider/...
I'd build a custom block with Designer Content (http://www.concrete5.org/marketplace/addons/designer-content/... ), giving it a field for name, link to page, and a dropdown with choices for the color.
Then either put 3 areas on the home page template to place those blocks in.
Then either put 3 areas on the home page template to place those blocks in.
First of all, thank you for the quick response and helpful tips. I didn't use any of the methods/tips listed above but figured out my own solution.
Because I'm a new user of C5 (have some intermediate knowledge of PHP and some more advanced one for CSS) I would like to hear your opinion on my workaround. So here it is:
1) I used a "Manual Nav" block to choose the links that I want to display.
2) Tweaked the view.php of the Manual Nav to add a counter and add some extra CSS class: link1, link2, link3, ... (to make it more C5 standard compliant I should probably made a custom block template). So now I have a custom CSS class for every link.
3) Add my Manual Nav to a Stack and trough Design on the CSS tab added an ID and a class for clearing floats.
4) Added a Stack (with my menu) to every page I needed.
5) Styled the menu with CSS.
That's it. I would really like to hear your opinion.
Here's the code of view.php (Manual Nav):
Because I'm a new user of C5 (have some intermediate knowledge of PHP and some more advanced one for CSS) I would like to hear your opinion on my workaround. So here it is:
1) I used a "Manual Nav" block to choose the links that I want to display.
2) Tweaked the view.php of the Manual Nav to add a counter and add some extra CSS class: link1, link2, link3, ... (to make it more C5 standard compliant I should probably made a custom block template). So now I have a custom CSS class for every link.
3) Add my Manual Nav to a Stack and trough Design on the CSS tab added an ID and a class for clearing floats.
4) Added a Stack (with my menu) to every page I needed.
5) Styled the menu with CSS.
That's it. I would really like to hear your opinion.
Here's the code of view.php (Manual Nav):
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?> <ul class="ccm-manual-nav"> <?php $i = 1; foreach ($links as $link): $cssClasses = array(); if ($link->isCurrent) { $cssClasses[] = 'nav-selected'; } if ($link->inPath) { $cssClasses[] = 'nav-path-selected'; } $cssClasses[] = 'link'.$i; $cssClasses = implode(' ', $cssClasses); ?>
Viewing 15 lines of 25 lines. View entire code block.
Looks like clean code that is specific to your need. What works works. Though I recommend reading up on overrides and creating this as a block template rather than leaving it in the original block view. It may also make it easier to attach your own css in the block template.
As a root/blocks template it won't get nulled next time you update c5.
Jordan created Manual nav, so he may have more pertinent comments.
As a root/blocks template it won't get nulled next time you update c5.
Jordan created Manual nav, so he may have more pertinent comments.
I will move the view.php to a block template. Tnx
I agree with John that if you have a working solution, then that's the best solution.
But since you asked for opinions... if I were building a site with this kind of thing, I'd use the Designer Content technique I mention above.
But since you asked for opinions... if I were building a site with this kind of thing, I'd use the Designer Content technique I mention above.
Since I'm a new C5 user I will give a shoot also to the designer content to see its potential. Tnx