>Hi All
>
>I'm trying to work out whether I can access a "grandparent" node , or
if I
>have to set the node to the "grandparent" and then load the related
nodes of
>the parent, then it's related node - which is the one I'm primarily
>interested in.  Sorry about the messy explanation - I basically have
groups,
>questionnaires belonging to a group and questions beloning to a
>questionnaire.  When I come to display the questions, I want to also
display
>a field that's stored in the group object that I selected whilst
navigating
>to the questions.

Hi it looks like you are using the relatednodes tag?
<mm:node id="myid" number="grandparentnumber">
        <mm:relatednodes type="questionnaires">
             <mm:relatednodes type="questions">
                   <mm:field name="title"> <!-- the title of the
question -->
                  <mm:node referid="myid"><!-- get the node that was
defined with id="myid"
                      <mm:field name="grouptitle"/>
                  </mm:node>
             </mm:relatednodes>
       </mm:relatednodes>
</mm:node>

one ohter way

<mm:list path="groups,questionnaires,questions">
        <mm:node element="questions">
             <mm:field name="title"> <!-- the title of the question -->
        </mm:node>
        <mm:node element="groups">
             <mm:field name="title"> <!-- the title of the question -->
        </mm:node>
</mm:list>

or even
<mm:list path="groups,questionnaires,questions">
             <mm:field name="questions.title"> <!-- the title of the
question -->
             <mm:field name="groups.title"> <!-- the title of the
question -->
</mm:list>

<<winmail.dat>>

Reply via email to