I think I spoke a little too soon - the handle I'm getting pack for
the current paragraph is like this :
/home/column1/0
the problem is that the paragraph number ("0" in the example above)
seems not to work with xpath queries.
I have "image" paragraphs attached as nested paragraphs to the main
paragraphs in the column. If i do a query like :
//home/column1//image
then i get results back that look like this :
/home/column1/0/images/0
/home/column1/0/images/00
which seem to be the handles for the two images attached to he first
paragraph in column1.
The problem is that obviously that queryu as it stands will return the
images attached to *any* paragraph in column1, not just the current one.
if I search for "//home/column1/0//image" then I don't get back any
results at all. The "0" paragraph number seem to be messing things up.
What am I doing wrong ?
Also - in these examples "home" is the name of the page I'm working
with - it's at the top of my website, but it doesn't seem to be at the
top of the JCR repository, even though in the browser it looks like
that (I have to put "//" in front of the quiry to get it to work) - I
assume that putting a wildcard at the front of my query isn't great
for performance, what should I put at the front, above my page name ?
thanks,
Josh
On 21 May 2008, at 02:22, Ruben Reusser wrote:
Josh:
<jsp:root version="1.2"
xmlns:cmsfn="http://www.magnolia.info/tlds/cmsfn-taglib.tld"
..>
Act Page: ${cmsfn:currentPage().handle}
Act Paragraph ${cmsfn:currentParagraph()}
will give you the handle of the current page (path) - you should be
able to create your query from that.
see also http://jira.magnolia.info/browse/MAGNOLIA-1647
Ruben Reusser
[EMAIL PROTECTED]
http://www.headwire.com
joshua portway wrote:
Hi,
I'm sure the answer to this question is really simple, but I can't
find it anywhere - I'm trying to use a <cms:query> tag to query the
descendants of the current paragraph (nested paragraphs) from its
paragraph template. How can I do this, since the query tag always
seems to query from the repository root node, and doesn't seem to
know about the context? I assume that if I could get the path to
the current paragraph I could prepend this to the query string, but
I don't actually know how to get hold of that either, without
resorting to scriptlets, and that seems kind of hacky so I'm sure
there must be a better way...
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/
----------------------------------------------------------------