We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36926
    • 701 Posts
    Hi,

    Anyone know if there’s a getResouces equivalent for the tplCurrentDocument parameter that’s in Ditto.

    Thanks

    Ben
      • 36926
      • 701 Posts
      Quote from: bennyb at Jan 29, 2011, 08:18 AM

      Hi,

      Anyone know if there’s a getResouces equivalent for the tplCurrentDocument parameter that’s in Ditto.

      Thanks

      Ben

      Couldn’t find any info on this, so decided to use an input filter in the template which does the trick:

      [[+id:if=`[[+id]]`:eq=`[[*id]]`:then=`
      Current tpl code goes here
      `:else=`
      default template goes here
      `]]
      


      Hopefully helpful to someone if they’re having the same issue.
        • 22303 MODX Staff
        • 10,725 Posts
        I think this would work as well, no :if= needed...
        [[+id:eq=`[[*id]]`:then=`
        Current tpl code goes here
        `:else=`
        default template goes here
        `]]