We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13150
    • 17 Posts
    I have been working on this for days and can not find an answer anywhere!:(

    Essentially, all that is happening is I have a container (User pages) with Agent personal page, and contact resource page inside that. I have a ditto call spitting out results of the User Pages container to the "About Us" page (a list of agents and those elements I want to show (standard Ditto construct). This page has an Agent Photo, Agent Bio, an Email Me link, and later on I will have to add another link that links to the personal listings page. This is a real estate website BTW.

    The problem:
    I can not seem to get the the link for eForm (Contact that agent form) to work! Please take a look at http://www.barnbrookrealty.com/2009/index.php?id=68to see what I’ve done. I have been able to get the link to work to the individual agent’s page, but not it’s child, which is its Contact "" resource page (Child).

    What I’ve done:
    In the Child (Contact Mary or whatever...) page of each Agent personal container page, I have placed an eForm call in the "content or Resource" area, with the &to=`email address` variable set. I wanted to use a Template Variable instead (which is set when the Agent’s page is created), but I get no joy with that attempt. So I opted for a manual input of the email address in the eForm variable instead. If you know a solution for that that would be great. Onward....

    In my Ditto &tpl, I have created a
    <a href="don't know what to put here"><img src="assets/images/emailMe.jpg" border="0"></a>
    element, to try to get to the child of each Ditto result item, but nothing is working? I’ve tried [!FirstChildredirect!!] as well, but that will only screw me up later on when I need to use the Agent Container resource for their personal page link (as that would only redirect to the contact page later).

    Please take a look and share what you would do here.http://www.barnbrookrealty.com/2009/index.php?id=68

    Thanks so much and Happy New Year!
    Sincerely, Kurt
      • 1122
      • 209 Posts
      In your Ditto’s tpl, you need to fetch the id of the contact page with another (nested) call of Ditto. Provided that the contact page is the only child of agent’s page, you should replace your "don’t know what to put here" text with:
      [[Ditto? &parents=`[+id+]` &depth=`1` &display=`1` &tpl=`email-link`]]
      

      "email-link" chunk:
      [~[+id+]~]
      

      If agent’s page has more children, then the contact page should be distinguished in some way, for example by adding to the above Ditto call filter parameter:
      &filter=`pagetitle,Contact,7`
      

      or the like.
        • 13150
        • 17 Posts
        Quote from: alik at Jan 06, 2010, 01:17 AM

        In your Ditto’s tpl, you need to fetch the id of the contact page with another (nested) call of Ditto. Provided that the contact page is the only child of agent’s page, you should replace your "don’t know what to put here" text with:
        [[Ditto? &parents=`[+id+]` &depth=`1` &display=`1` &tpl=`email-link`]]
        

        "email-link" chunk:
        [~[+id+]~]
        

        If agent’s page has more children, then the contact page should be distinguished in some way, for example by adding to the above Ditto call filter parameter:
        &filter=`pagetitle,Contact,7`
        

        or the like.

        Thank you fo rthe response, however, it seems using this code
        <a href="[~[+[[Ditto? &parents=`[+id+]` &depth=`1` &display=`1` &tpl=`agentMailTPL`]]+]~]"><img src="assets/images/emailMe.jpg" border="0"></a>


        does not render a link. this is what I see .../2009/[~~]. If I try this:
        <a href="[+[[Ditto? &parents=`[+id+]` &depth=`1` &display=`1` &tpl=`agentMailTPL`]]+]"><img src="assets/images/emailMe.jpg" border="0"></a>

        it simply gives me the Id of 68, which the about us page (consisting of the ditto call start point.)
          • 13150
          • 17 Posts
          OK!!!!!!

          I screwed up Flame away!
          I printed as you suggested without [~~] and the [~[++]~] elements and it works PERFECTLY!!!!!!!!!!