Hi Will,
thanks for your reply. Yes - that's how I've implemented it too, but I
just couldn't believe there wasn't a simpler and more efficient way
and it made me wonder whether there were better JCR implementations
out there that I should try.
Maybe I'm really misunderstanding the performance issues with
Jackrabbit, but I assumed that iterating through a few hundred Content
nodes would take a significant amount of time and be a nasty
performance hit - don't they have to be retrieved from the Database?
The other solution I was considering was to have a repository event
listener that would be triggered whenever pages were added or removed
from the repository and automatically add "previousPage" and
"nextPage" properties to the content nodes, but maybe that'll be for
version 2.0 :)
cheers,
Josh
On 24 Jun 2008, at 21:05, Will Scheidegger wrote:
Hm... only to have a "next" and "previous" link on a page I would
not go into the hassle of changing the JCR implementation. Check out
the page below. It's a static export of a magnolia site where we
easily added "next" (german: "weiter") and "previous" (german:
"zurück") links underneath the staff pictures. O.k., it did include
some coding, we had to get the list of siblings manually (by getting
the parent then node and all its visible children) but it's for sure
no rocket science.
http://www.it-processing.ch/de/ueber_uns/team/christian_schnidrig.html
-will
On 24.06.2008, at 18:54, joshua portway wrote:
Having just spent the day bashing my head against a wall trying to
work out how to implement "next page" and "previous page" links on
a site I'm wondering if anyone has tried using alternative JSR
implementations to Jackrabbit.
From what I can tell after several hours of irritation Jackrabbit
doesn't seem to implement any kind of positional axes in its XPath
implementation (ie. I can't use following-sibling or even the
"parent" axis!). I've tried several possible workarounds and the
only way I can think of to implement this is to literally iterate
through ever y child of the parent of the current page in order to
find the next and previous pages - which seems insanely
inefficient. Hopefully I'm just misunderstanding something and if
anyone can help me out with advice I'd be very grateful -
Otherwise I've been considering trying to swap out the JCR
implementation for something else - has anyone tried the Exo
platform JCR for instance (I could only find references from
several years ago in the mailing list archives) ?
Josh
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------