Emmanouil Batsis (Manos) wrote:
>
> Emmanouil Batsis (Manos) wrote:
>> I'm trying to render menu as a list of all blogs in a custom template.
>> AFAIK there is no easy method to obtain the list of blogs from the
>> site model, so I thought reusing the _blogdirectory.vm code for this.
>> It doesn't work though; the anchor links (first letter) appear in my
>> template, but not the list of blogs below it.
>
> To be a bit more precise, $site.getWeblogsByLetterPager($chosenLetter,
> -1, $pageLength) always returns an empty pager.
The easiest way I could figure out to create my menu is something like
the code bellow.
<ul class="menu">
#set($menuBlogs = $site.getNewWeblogs(1000000, 20))
#foreach($loopblog in $menuBlogs)
<li>
<a
href="$url.absoluteSite/$loopblog.handle"><span>$loopblog.handle</span></a>
</li>
#end
</ul>
Will only work for 1000000 days though...
--
Manos Batsis, Chief Technologist
__ _
____ _/ /_ (_)_________ ____ ______
/ __ `/ __ \/ / ___/ ___// __ `/ ___/
/ /_/ / /_/ / (__ |__ )/ /_/ / /
\__,_/_.___/_/____/____(_)__, /_/
/____/
http://www.Abiss.gr
5, Daphnidos Street,
14122, Neo Iraklio,
Athens, Greece
Tel: +30 210 2851517
http://www.linkedin.com/in/manosbatsis