Display tags for each entry

View: New views
3 Messages — Rating Filter:   Alert me  

Display tags for each entry

by Claudio Miranda :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I see tag cloud support for roller 4, but I want to display tag names, for each entry, so which template shoud I use to print each tag to its respective entry.

See how blojsom does that: Tags: java performance

http://www.claudius.com.br/blog/claudio/2007/11/10/450-GB-de-HEAP

* I started to migrate from blojsom to roller.

Re: Display tags for each entry

by Simon Haslam :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've downloaded the Roller 4 themes bundle from roller.dev.java.net. Searching the Weblog.vm
templates I see tag clouds in: rational, naturalbeauties and frontpage. Note in rational it says
you have to uncomment the following lines:

##                      <h3>Tag Cloud</h3>
##                      <p>
##                      #set($mytags = $model.weblog.getPopularTags(-1, 30))
##                      #foreach ($tag in $mytags)
##                      <a class="tagcloud${tag.intensity}" href="$url.tag($tag.name)"
title="${tag.count} posts">$tag.name</a>
##                      #end
##                      </p>

You could try switching to Natural Beauties to see if the tag cloud works as you expect and then
you can incorporate the above into your own template.

HTH


      __________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com


Re: Display tags for each entry

by Dave-431 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Jan 21, 2008 2:54 PM, Claudio Miranda <claudio@...> wrote:
> I see tag cloud support for roller 4, but I want to display tag names, for
> each entry, so which template shoud I use to print each tag to its
> respective entry.
>
> See how blojsom does that: Tags: java performance
> http://www.claudius.com.br/blog/claudio/2007/11/10/450-GB-de-HEAP
>
> * I started to migrate from blojsom to roller.

Somewhere in your _day template, within the loop that emits your
entries add this:

       Links:
       #foreach($tag in $entry.tags)
           <a href="$url.tag($tag.name)" title="$tag.count">$tag.name</a>
       #end

- Dave