(Allen: I just realized that I sent my previous message to you
personally and not to the list, so I resent it to the list for thread
archival purposes. I was going to send this response to the list, too,
but I'm not sure if you meant all your below comments for the user list.)
Allen Gilliland wrote:
On Tue, 2006-02-28 at 16:44, Sean Gilligan wrote:
Allen Gilliland wrote:
one entry per page is just a permalink and roller alreayd supports
that. by default a permalink will contain links to the previous/next
permalinks chronologically.
Right. The permalink page has links to previous/next. I'd like the
home page and the category pages to be (or look like) the permalink
pages of the most recent entry (in that category.) I'm not sure what
the best way to do that is...
I'm not sure I understand what you here. Do you just mean you want them
to be pagable?
Do you want the blog homepage to only have a single entry on it and then
be pagable like the permalink urls?
Right. And I'd like to do the same thing for categories and be pageable
within that category.
I don't fully understand how the Weblog template, Velocity context, and
macros are used
Unfortunately, I think that process is a bit wacky myself.
The bum part is that I don't think
there is any concrete way to know exactly what objects you have access
to for any url, other than trial and error or tracing through the code.
That's what I was afraid of...
Speaking somewhat abstractly I think my issue with the current process
is that Roller tries to do too much for the user, rather than just
giving the user access to all the relevant data for their weblog and
letting them format it however they like via their templates. I am also
not really a fan of the idea of prefetching data for the velocity
context, since we don't really know what data is meant to be used
anyways.
It seems like these two goals (#1 - putting all the relevant data in the
context and #2 - only fetching what data is going to be used) can be in
conflict. (Unless you want the getters in the context objects to
actually do the DB fetching.) There are certainly some trade-offs here
that I don't fully understand at this point. (If you remember we bumped
against this issue with the RSDServlet/FlavorServlet stuff.)
In the long run I would prefer to see an nice object
hierarchy/api placed into the velocity context which provides the user
an easy way of accessing any data specific to their weblog.
Simple, consistent, and well-documented, of course. ;)
Oh yeah, and efficient...
IMO many of the macros also try and do "too much" and in some ways end
up making things more confusing. I think my biggest pet peeve would be
that we do a little too much of this ...
#showSomeUrl()
and then out pops an html anchor element. while that works i like the
idea of having the user do the html part themselves, like this ...
<a href="$roller.someobj.properUrl"
class="foo">$roller.someobj.properUrlText</a>
and we wrap all the proper logic for constructing the url into the code
somewhere.
I agree with you 100% (or more) on this one. If you look at the
templates in Movable Type or Blogger they don't hide any of the html.
There are container elements that can do loops or conditionals, but
none of them (IIRC) actually generate HTML.
I think the way Roller employs macros is the right thing from a software
developer's point of view: encapsulating logic and eliminating
duplicate code. But HTML designers and bloggers who dabble in HTML are
not programmers. What makes maintaining the templates for the Roller
developers easier makes it harder for blog authors to modify their
templates.
(One idea that might be useful is to use macros (or macro-like
functionality) at build time to generate the common/default parts of the
generated templates.)
i don't think there is an easy way to have
a permalink point to the previous/next permalink in a given category.
What's the hard way?
hacking away at the code :(
I'll take a look, with an eye towards submitting any useful changes I
can produce.
-- Sean