Main Question:
How do I get Sling.getContent() to not follow the resourceType
on a JCR node?
Details:
In my main JSP, I'm using /system/sling.js to do a
Sling.getContent('/mynode', 1); to see if people have registered pages with me.
I then create navigation controls based on the categories and pages available
(using attributes on the node). Worked like a charm.
I then started to create sling:resourceType on the '/mynode'
node and its children to have the data drive the UI and to take advantage of
different views of the same page. Very cool. I ended up using a GET.jsp so
that sling/JCR would direct all GET requests to my JSP page (i.e.
http://server:port/mynode). That is working too.
But now I've noticed my navigation is empty because the
getContent(...) node is following the resourceType on /mynode and its children
and ends up trying to eval the text of the JSP that the resourceType eventually
resolves to (GET.jsp). I can see why that is happening if the getContent(...)
eventually uses a GET to acquire the nodes information.
Is there any way to get both of these working together? Can I
get Sling.getContent() to not follow the resourceType? Or is there a (much)
better way to do this (it just seemed so simple)?
Thanks.
Andrew Top