Jahia Dev Forum > how can i get node...

0 (0 Good)
0 (0 Bad)

how can i get node from page

by  obayok »  2012/10/16 14:49

Hi, all, i try do this behaviour

mainPage

  page1

  page 2

mainPage should show information from page 1 and page 2. In this pages I add [my:node], and i need to know properties from this node.

How can i do it?

<c:set var="parent" value="${jcr:getParentOfType(currentNode,'jnt:page')}"/>

<c:forEach items="${jcr:getNodes(parent, 'jnt:page')}" var="subPage">

......

</c:forEach>

subPage - it is my page in which i try to get node

 

 

Thanks

  • how can i get node from page
    2012/10/16 14:49

    obayok <p> Hi, all, i try do this behaviour</p> <blockquote> <p> mainPage</p> <p> &nbsp; page1</p> <p> &nbsp; page 2</p> </blockquote> <p> mainPage should show information from page 1 and page 2. In this pages I add [my:node], and i need to know properties from this node.</p> <p> How can i do it?</p> <p> &lt;c:set var=&quot;parent&quot; value=&quot;${jcr:getParentOfType(currentNode,&#39;jnt:page&#39;)}&quot;/&gt;<br /> <br /> &lt;c:forEach items=&quot;${jcr:getNodes(parent, &#39;jnt:page&#39;)}&quot; var=&quot;subPage&quot;&gt;</p> <p> ......</p> <p> &lt;/c:forEach&gt;</p> <p> subPage - it is my page in which i try to get node</p> <p> &nbsp;</p> <p> &nbsp;</p> <p> Thanks</p>

  • Number of messages  11
    Registration date Oct 16, 2012
    0 (0 Good)
    0 (0 Bad)

    Re: how can i get node from page

    by  shyrkov »  2012/10/22 21:50

    Hello,

    could you, please, provide a bit more details on the issue: definitions.cnd (if you are using custom definitions)?

     

    The physical structure of the content tree can be checked using either Repository Explorer (for "root" user) or the low-level JCR Browser in the Jahia Tools Area ( http://localhost:8080/tools/jcrBrowser.jsp )

    Can you post the details of the structure you have or a screenshot from the Repository Exmplorer?

     

    Kind regards

    Sergiy

  • Re: how can i get node from page
    2012/10/22 21:50

    shyrkov <p> Hello,</p> <p> could you, please, provide a bit more details on the issue: definitions.cnd (if you are using custom definitions)?</p> <p> &nbsp;</p> <p> The physical structure of the content tree can be checked using either Repository Explorer (for &quot;root&quot; user) or the low-level JCR Browser in the Jahia Tools Area ( http://localhost:8080/tools/jcrBrowser.jsp )</p> <p> Can you post the details of the structure you have or a screenshot from the Repository Exmplorer?</p> <p> &nbsp;</p> <p> Kind regards</p> <p> Sergiy</p>

  • Number of messages  407
    Registration date Oct 22, 2012
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page