EllisLab text mark
Advanced Search
     
List all the channels as links
Posted: 19 January 2012 11:38 AM   [ Ignore ]
Joined: 2011-12-06
2 posts

Hello,
I want to list my channels as a nav. For this I have tried to do the following:

<nav>
  <
ul>
   
{exp:channel:info channel="channel1|channel2|channel3|channel4|channel5|channel6|channel7"}
    
<li>{channel_title}</li>
   
{/exp:channel:info}
  
</ul><!-- / -->
 </
nav

But that does not work (“channel#” being the short name value of the channel).

I have noticed that if I take out the tunneling in the “channel=” section it shows up just fine (as long if I am just calling one channel).

Is there a way to show all my channels as a UL list?

 
Posted: 19 January 2012 03:18 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2002-12-06
4240 posts

Channel info is a non-looping tag pair (just tested locally).

There’s no built-in way to return a list of all the channel names (which is why I recommend just hard-coding top nav).

 Signature 

Get the missing EE2 owner’s manual - a complete guide to building an EE2 site.  It’s available in PDF or print.

 
Posted: 19 January 2012 03:45 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2011-12-06
2 posts

:(

Ok, Thanks!