<a class="hide fancybox" rel="gallery-c" href="[[getField? &docid=`27` &field=`my-tv`]]">[[getField? &docid=`27` &field=`my-tv`]]</a>
This isn't working because its not looking in docid 27:
[*my-tv:is=``:then=``:else=`[[getField? &docid=`27` &field=`my-tv`]]`*]
Is the a simple solution for this?
Evolution user, I like the back-end speed and simplicity

-
☆ A M B ☆
- 24,524 Posts
If that phx is in a tpl for getField, then you need to use [+my-tv+], otherwise you're looking for the value of the my_tv TV for the current resource, not the one getField is fetching from.
thanks for looking for a solution
tpl doesn't work, when i do this test:[[getField? &docid=`29` &tpl=`test`]]
and test chunk is [+longtitle+] or any other field it shows the pagetitle.
looking in the code of getField i don't see any &tpl function
Evolution user, I like the back-end speed and simplicity

-
☆ A M B ☆
- 24,524 Posts
Hm. Been a while since I used phx. I think you'll have to do something like this - embedding the snippet in phx tags. Not sure if this works, but it should be something like it.
[+phx:if=`[[getField? &docid=`29` &field=`my_tv`]]`:ne=``:then=`[[getField? &docid=`29` &field=`my_tv`]]` +]
-
☆ A M B ☆
- 24,524 Posts
Personally, I would hack getField to have an option to put its output into a placeholder.
That phx example works great, thanks Susan. That one didn't cross my mind.
Because of the empty href tag my page was looking for nothing and did real bad performance.
Thats solved now :-D
Evolution user, I like the back-end speed and simplicity
