Jahia in English > Child node and view

0 (0 Good)
0 (0 Bad)

Child node and view

by  olizi@smile.fr »  2016/08/25 15:05

Hello.

I have a problem with view of node. I'm work with this tutorial: https://www.youtube.com/watch?v=cFzKxAaQgAQ&index=10&list=PLCi1wJLT02zhNX8RxsvK8vvF9PN8FIZoK , but somewhy it doesn't work.

In the 59th minute of the video I have got a different from expected result. There should be a kind of button for adding employee(child node) to company division(parent node). The next code should display that button(sorry about format, I don't know how to paste it correctly):

<h2>${currentNode.properties['jcr:title'].string}</h2>
<c:forEach items="${jcr:getChildrenOfType(currentNode, 'mynt:employee')}" var = "employee">
  <template:module node="${employee}" view="default"/>
</c:forEach>


<tempate:module path="*"/>

 

but there is no any button there, and I have no idea why. Could someone explain what I'm doing wrong? Thank you.

P.S. Company division has next declaration in cnd file:

[mynt:companyDivision] > jnt:content, mix:title, mymix:acmeComponent
 - jcr:title (string)
 + * (mynt:employee)

  • Child node and view
    2016/08/25 15:05

    olizi@smile.fr <p>Hello.</p> <p>I have a problem with view of node. I&#39;m work with this tutorial: https://www.youtube.com/watch?v=cFzKxAaQgAQ&amp;index=10&amp;list=PLCi1wJLT02zhNX8RxsvK8vvF9PN8FIZoK , but somewhy it doesn&#39;t work.</p> <p>In the 59th minute of the video I have got a different from expected result. There should be a kind of button for adding employee(child node) to company division(parent node). The next code should display that button(sorry about format, I don&#39;t know how to paste it correctly):</p> <p>&lt;h2&gt;${currentNode.properties[&#39;jcr:title&#39;].string}&lt;/h2&gt;<br /> &lt;c:forEach items=&quot;${jcr:getChildrenOfType(currentNode, &#39;mynt:employee&#39;)}&quot; var = &quot;employee&quot;&gt;<br /> &nbsp; &lt;template:module node=&quot;${employee}&quot; view=&quot;default&quot;/&gt;<br /> &lt;/c:forEach&gt;</p> <p><br /> &lt;tempate:module path=&quot;*&quot;/&gt;</p> <p>&nbsp;</p> <p>but there is no any button there, and I have no idea why. Could someone explain what I&#39;m doing wrong? Thank you.</p> <p>P.S. Company division has next declaration in cnd file:</p> <p>[mynt:companyDivision] &gt; jnt:content, mix:title, mymix:acmeComponent<br /> &nbsp;- jcr:title (string)<br /> &nbsp;+ * (mynt:employee)</p>

  • Number of messages  4
    Registration date Aug 25, 2016
    0 (0 Good)
    0 (0 Bad)

    Syntax error

    by  olizi@smile.fr »  2016/08/25 15:33

    Sorry, I made syntax mistake in <tempate:module path="*"/>. Correct line is <template:module path="*"/>

  • Syntax error
    2016/08/25 15:34

    olizi@smile.fr <p>Sorry, I made syntax mistake in &lt;tempate:module path=&quot;*&quot;/&gt;. Correct line is &lt;template:module path=&quot;*&quot;/&gt;</p>

  • Number of messages  4
    Registration date Aug 25, 2016
    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