-
☆ A M B ☆
- 326 Posts
I’ve tried to write out the long explanation of what I’m trying to do five times and it’s just too complicated, but the crux of my issue is this:
I’m using Ditto to call another page. This other page contains a template variable, and its value is supposed to be the ID number for another section of the site.
The easy answer is to hand-enter this value, but I’ve written a snippet that figures out this other ID number automatically, and it works great on the page. But when I try to put the snippet call in a TV and then display the value of the TV with Ditto, it doesn’t seem to execute the snippet. I’m guessing this has something to do with parse order. Is there a solution to this? I’m using Evo 1.0.2.
I’d be glad to clarify if I’m not giving enough details.
Thanks!
-
☆ A M B ☆
- 326 Posts
I think I may be on to a solution but can’t seem to get it working, so let me pose another question. Can I set a placeholder in my snippet, and then reference that placeholder in the Ditto call on the other page?
-
MODX Staff
- 10,725 Posts
Placeholders are only persistent for the current request, so that would not work.
The problem is the snippet has to be smart enough to figure out what it needs to regardless of what page it is executing on, yet still know what page it is being executed for. This is really a snippet design issue.