I love GetField o.O
Half the time I had to create TV’s in order to display, for example, the pagetitle of the ultimate parent. It was such a hassle though because the client would then need to fill a TV for each section within the site.
We placed a GetField call right above our side menu so that users would know what section of the website they were in. To do this we used the following call:
[[GetField? &parent=`1` &parentLevel=`0` &field=`pagetitle` &topid=`235`]]
GetField was also really handy in the sidemenu’s Wayfinder call. I used the call above but changed the value for the &field parameter to `id` to get the ID number of the resource. See GetField code below:
[[GetField? &parent=`1` &parentLevel=`0` &field=`id` &topid=`235`]]
and place this in the Wayfinder call:
[!Wayfinder? &startId=`[[GetField? &parent=`1` &parentLevel=`0` &field=`id` &topid=`235`]]` &outerTpl=`sidemenuOuterTpl` &innerTpl=`sidemenuInnerTpl` &rowTpl=`sidemenuRowTpl`!]
And Ta Da! The Wayfinder call above was handy for a side menu that changes for each section a web user is in. Before we used to have to define a TV for the &startId of the side menu since it changed depending on what section of the site you were in.
I have to say though, I have to play around sometimes with the &parent and &parentLevel parameters a bit in order to get the result I want. I go to the info at
http://modxcms.com/extras/package/173 and refer to it pretty much anytime I need to use GetField.
Hope this helps someone. I would hate to see such a useful snippet be disregarded because it may seem a little confusing to begin with!
Sarah