Hi Dave,

I thought the tagsIndex template is used to display entries by a given tag (
http://rollerweblogger.org/roller/entry/roller_themes_part_2).  But the line
in PageServlet reads:

    } else if ("tags".equals(pageRequest.getContext()) &&
pageRequest.getTags() == null) {

So it looks like it loads the tagsIndex page only when you don't provide any
specific tags.  This is confirmed by my URL experiment:

1)

http://localhost/home/tags/spring
-> displaying the weblog template, entries tagged by "spring"

2)

http://localhost/home/tags/
-> displaying the tagsIndex template, all entries (the ending / is required;
otherwise 404)

3)

http://localhost/roller-ui/rendering/page/home/tags/spring
<http://localhost/roller-ui/rendering/page/home/tags/spring>-> using the
weblog template, entries tagged by "spring", same as (1)

4)

http://localhost/roller-ui/rendering/page/home/tags
-> displaying the tagsIndex template, all entries. same as (2)

I read another thread discussing tagsIndex in Roller 5, where he got
"/tags/xxx" to display all entries by "xxx" using the tagsIndex template.
 So maybe this is a bug in Roller 4?

Thanks,
Daniel

On Tue, Apr 12, 2011 at 8:31 PM, Dave <[email protected]> wrote:

> Take a look at the doGet() method of the PageServlet for the
> template-choosing logic.
>
> - Dave
>
>
>
> On Sun, Apr 10, 2011 at 4:17 PM, Daniel Ruan <[email protected]> wrote:
> > I turned on the debug but didn't see any error messages.
> >
> > We had our own theme. The templates we created for permalink and wegblog
> > etc. worked fine.
> >
> > As a test, I changed the name of the tagsIndex template to a non-existing
> > file name and got an exception "Couldn't load  template
> > file"  from ThemeManagerImpl.  This means the XML config is not a problem
> as
> > it did cause Roller to load the file.
> >
> > What is the class that chooses the template file at run time based on the
> > URL?
> >
> > Thanks,
> > Daniel
> >
> > I don't see any problem with your tagsIndex part of of theme.xml. Are
> >> you working with a build-in Roller theme or something new? See
> >> anything in the logs?
> >>
> >> If you turn on DEBUG logging for the rendering system you might find
> >> some clues about what is going wrong. Add this to your
> >> roller-custom.properties to turn on DEBUG for rendering:
> >>
> >>    log4j.logger.org.apache.roller.weblogger.ui.rendering=DEBUG
> >>
> >> - Dave
> >>
> >
>

Reply via email to