You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Horatia <ro...@gmx.info> on 2009/09/24 04:58:51 UTC

WeblogCategories II

Hello!

Is there a way to hide one category of
categories  displayed; e.g. from:

All                   All
Music                 General
General      to       Java 
Java                  

Thank you.

Horatia

Re: WeblogCategories II

Posted by Dave <sn...@gmail.com>.
On Wed, Sep 23, 2009 at 10:58 PM, Horatia <ro...@gmx.info> wrote:
> Is there a way to hide one category of
> categories  displayed; e.g. from:
>
> All                   All
> Music                 General
> General      to       Java
> Java

Write your own template and show only the categories you want to display.

You don't have to use the built in #showWeblogCategoryLinksList() macro.

- Dave

Re: WeblogCategories II

Posted by Ana Mercedes Pardo <an...@gmail.com>.
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 <sn...@gmail.com>

> On Thu, Nov 19, 2009 at 11:36 AM, Ana Pardo <an...@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
>

Re: WeblogCategories II

Posted by Dave <sn...@gmail.com>.
On Thu, Nov 19, 2009 at 11:36 AM, Ana Pardo <an...@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

Re: WeblogCategories II

Posted by Ana Pardo <an...@gmail.com>.
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?

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?


Horatia wrote:
> 
> 
> Hello!
> 
> Is there a way to hide one category of
> categories  displayed; e.g. from:
> 
> All                   All
> Music                 General
> General      to       Java 
> Java                  
> 
> Thank you.
> 
> Horatia
> 
> 

-- 
View this message in context: http://old.nabble.com/WeblogCategories-II-tp25588583s12275p26421385.html
Sent from the Roller - User mailing list archive at Nabble.com.