I'm trying modify Robert's code to only expand only the "top layer"? I have this functionality coded in my old 1.3 Flexviewer that I figured out, so I assume this is possible but after spending a couple of days on it I can't seem to figure it out.
The problem is with using "extended=true" is that it expands lengthy layers such as "soils' and some layers don't expand at all. This is what I get by default in the first screenshot. What I would like to see is in the second screenshot.