roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave <snoopd...@gmail.com>
Subject Re: WeblogCategories II
Date Mon, 23 Nov 2009 13:11:23 GMT
On Thu, Nov 19, 2009 at 11:36 AM, Ana Pardo <anampardo@gmail.com> wrote:
> Hello! I have a problem with customizing the way categories are displayed. I
> want to list each category individually, so the only way i could think to do
> this is:
>
> <p>#set($rootCategory = $model.weblog.getWeblogCategory("Noticias"))
>  #showWeblogCategoryLinksList($model.weblog.getWeblogCategory("Noticias")
> false true)</p>
> <p> #set($rootCategory = $model.weblog.getWeblogCategory("Nuestras Marcas"))
> #showWeblogCategoryLinksList($rootCategory false true)</p>
> <p>#set($rootCategory = $model.weblog.getWeblogCategory("Eventos"))
> #showWeblogCategoryLinksList($rootCategory false true)</p>
>
> This code gives me two problems:
>
> 1) When i select any of those categories the name changes to
> "categoryObject.name". I don't understand wy it doesn't shows the name of
> the category instead. Is there an easier way to list the category one by
> one? Or is there something else i have to add to my code?

That is probably because $model.weblog.getWeblogCategory("Noticias")
or some other call to getWeblogCategory() is failing and returning
null. You might need to pass "/Noticias"


> 2) It appends a bullet at the beginning of the category name. I can't find
> the way of deleting that, i have removed the tags <li></li>,<ul></ul>,
and
> any other tag asociated with list in html and it doesn't go away. Is there a
> way of doing this?

If you use #showWeblogCategoryLinksList() then you're gonna get a list
(i.e. with <li> elements). You can use CSS styles to make those go
away.

You don't have to use #showWeblogCategoryLinksList(), you can write
your own Velocity code to display the categories any way you'd like.

Hope that helps...

- Dave

Mime
View raw message