We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33988
    • 110 Posts
    I am making a Ditto feed that has PHx within the Ditto template. The code for the template is below. Somehow, when the Ditto feed is viewed, if [+company+] has data, then nothing is displayed, if it is empty then [+pagetitle+] displays like it should. I have the same issue with [+ad_text+] and [+ad_image+].
    [!Ditto? &parents=`[[GetChildIds? &docid=`3`]]`&randomize=`1` &total=`10` &hiddenFields=`company,ad_image,ad_text,pagetitle,introtext` &tpl=`header` &showInMenuOnly=`1` &phx=`1` !]

    <div>
    <div class="left">
    			[+phx:if=`[+company+]`:isnot=``:then:=`<h2>[+company+]</h2>`:else=`<h2>[+pagetitle+]</h2>`+]
    			<hr />
    			[+phx:if=`[+ad_text+]`:isnot=``:then:=`<p>[+ad_text+]</p>`:else=`<p>This member is new and has not updated this section yet,<br />please click below to see more information about this member.</p>`+]
    			<hr />
    </div>
    <div class="right">
    		[+phx:if=`[+ad_image+]`:isnot=``:then=`<img class="right" src="[+ad_image+]" alt="[+pagetitle+]" title="[+pagetitle+]" width="400" height="145" />`:else=`<img class="right" src="[+logo+]" alt="[+pagetitle+]" title="[+pagetitle+]" width="400" height="145" />`+]
    </div>
    </div>
      Sal Sodano
      President & Co-Founder of SkyToaster
      My Website Salscode.
      • 3749
      • 24,544 Posts
      Try changing "then:=" to "then=" smiley
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 33988
        • 110 Posts
        That worked, I feel dumb now, I think I just spent way too many hours in front of a computer. Thanks BobRay.
          Sal Sodano
          President & Co-Founder of SkyToaster
          My Website Salscode.