roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ana Mercedes Pardo <anampa...@gmail.com>
Subject Re: WeblogCategories II
Date Tue, 24 Nov 2009 17:43:47 GMT
Thank You so much for your answer. I tried to put
$model.weblog.getWeblogCategory("/Noticias") and i still get the same
problem.
Also i tried with:

- #showWeblogCategoryLinksList("/Noticias" false true)
- $model.weblogCategory("/Noticias")
- This code from de roller template guide

#foreach ($cat in $model.weblog.categories)

#if ($cat.name != "Music")

$cat.name<br>

#end

#end

I tried several ways using the roller- template guide. And i can't find
something that helps. Is there a macro that just display a string that i
tell it to. Something that works like an echo on other languajes? I just
want to get the name of the category and display it.




2009/11/23 Dave <snoopdave@gmail.com>

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message