title said it all Is it possible to get a document tv value of another document then you are currently on?
Thanks
Brian
Check out the resources page for the getField snippet (by grad if I remember rightly)...think it does just what you are looking for.
Adrian Lawley: www.adrianlawley.com
I looked into that but it did not work for me.
everytime i tried to get a tv it threw the following error.
Fatal error: Call to undefined function: gettv() in /home/canvas/domains/canvasli.com/public_html/dev/manager/includes/document.parser.class.inc.php(748) : eval()’d code on line 292
It works find when pulling in normal fields just won’t work on tvs
[[getField? &docid=`364` &field=`FeaturedBlogTitle`]]
Hi,
Which version of php are you running?
As far as I remember the getTV is defined at the bottom of the snippet code.
With older version of php this can be a problem since the function is called before its definition.
Otherwise you can do the same by using Ditto and &documents params.
:-)
-
MODX Staff
- 1,535 Posts
Yeah, as heliotrope says, it could be the getTV function being in the wrong place - you could try and cut n’ paste the getTV function code to above where it’s first called.
Garry Nutting
Senior Developer
MODX, LLC
Email:
[email protected]
Twitter: @garryn
Web: modx.com
Thanks heliotrope that did the trick. I moved the funtion to the top of the snippet and all is working correctly.
Thanks
Brian