We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10226
    • 412 Posts
    here is the situation, below I have my menu structure with the code (the important part anyway) of that page to the right of it. As you can see from index 118 it populates all the children (works great). I’ll deal with sorting and formatting later smiley On the child nodes it populates and displays properly, so this is fully working, but it feels a bit dirty to me.

    Is there a difference between [[Ditto?]] and [!Ditto?!] ?
    I tried to embed the document number for the child nodes using a placeholder, serious back-end confusion. Do I have to specify the document number manually or is there a way to tell ditto to process the current document only without it tripping over itself?
    If this is how it has to be done, am I using the right calls to Ditto?


    test_ps (118) > [[Ditto?parents=`118`&tpl=`prof_sum`&display=`all`]]
    Cockatiel (119) > [!Ditto?&startID=`119`&documents=`119`&tpl=`prof_full`&display=`1`!]
    Indian Ringneck (120) > [!Ditto?&startID=`120`&documents=`120`&tpl=`prof_full`&display=`1`!]
    Plum-headed Parakeet (121) > [!Ditto?&startID=`121`&documents=`121`&tpl=`prof_full`&display=`1`!]
    ...

    Thanks!
      • 18397
      • 3,250 Posts
      1. The difference between [[ and [! snippet calls is [[ caches the result while [! does not.

      2. Why do all of the children of document 118 have Ditto calls on them? If you are simply trying to show a block of information for each, you can just use a chunk and normal [*tags*].

      FYI you should not set startID (which is now &parents) and documents together at the same time. It can lead to unwanted results.
        • 10226
        • 412 Posts
        Mark, thanks for the info.

        1. cached - uncached.. neat

        2. the child nodes have ditto calls because simply calling the {{prof_full}} renders the chunk (template) with no data. This is why I came in to the logic of using a second ditto call.

        I have looked over some of the documentation before hitting post and looking like a tool, but found nothing I’m not doing. I’m probably messing up the most simple thing.
          • 18397
          • 3,250 Posts
          What is the contents of prof_full?
            • 10226
            • 412 Posts
            Here is my code.. it works great with the odd calls mentioned in my original post.

            prof_full consists of:
            <table width="100%">
                <tr>
                  <td colspan="4"><h1>[+pp_title+]</h1></td>
                </tr>
              </table>
              <table width="100%">
                <tr>
                  <td><div id="proleft"><a href="[+pp1+]" title="[+pp_title+]" class="thickbox" ><img src="[+ppt1+]" alt="[+pp_title+]" width="160" height="160" border="0"/></a></div></td>
                  <td><div id="procen"><a href="[+pp2+]" title="[+pp_title+]" class="thickbox" ><img src="[+ppt2+]" alt="[+pp_title+]" width="160" height="160" border="0"/></a></div></td>
                  <td><div id="procen"><a href="[+pp3+]" title="[+pp_title+]" class="thickbox" ><img src="[+ppt3+]" alt="[+pp_title+]" width="160" height="160" border="0"/></a></div></td>
                  <td><div id="proright"><a href="[+pp4+]" title="[+pp_title+]" class="thickbox" ><img src="[+ppt4+]" alt="[+pp_title+]" width="160" height="160" border="0"/></a></div></td>
                </tr>
              </table>
              <div id="proleft">
              <table width="100%">
            
                <tr>
                  <td><p>Scientific name: <em>[+pp_sci+]</em><br/>
                      <br/>
                      Endemic to: [+pp_native+]  <br/>
                      <br/>
                      Life Span: [+pp_lifespan+] <br/>
                      <br/>
                      Size: [+pp_size+]  <br/>
                      <br/>
                      Call & Noise Level: [+pp_call+]</p></td>
                  <td valign="top"><div id="proright"><br/>
                      <a href="[(base_url)]en_stat.php?keepThis=true&TB_iframe=true&height=600&width=600" title="Endangered Status" class="thickbox"">Conservation Status<br/>
                    <img src="http://i182.photobucket.com/albums/x241/sweet_skies_aviary/site_pics/[+pp_cs+].png" width="200" height="53" border="0"/></a></div></td>
                </tr>
              </table>
              <table width="100%">
                <tr>
                  <td>Mutations: [+pp_muta+] <br/>
                    <br/></td>
                </tr>
                <tr>
                  <td>Physical Characteristics: [+pp_phys+]  <br/>
                    <br/></td>
                </tr>
                <tr>
                  <td>Personality: [+pp_temper+]  <br/>
                    <br/></td>
                </tr>
              </table>
            </div>
            

            Admin Edit: Added code tags
              • 18397
              • 3,250 Posts
              In order to use the chunk for this you have to use [*tags*] not [+placeholders+]. Just swap the tags and it should work.
                • 10226
                • 412 Posts
                Excellent!

                *solved*

                Thanks!