I’m just starting with MODx, which seems incredible, and the community here is quite active.
For some reasons, I want to be able to access to other applications, but keep it as a page inside the main site. I was looking for a way to put an iframe, then I found the view port widget, which really simplifies things. There is only one problem with it, the frame has a fixed size, so you might have to scroll thru it - ok, with autosize and stretch to fit, it expands in all the width available in your template, but height stays the same.
I found a script by Dynamic Drive which resizes the iFrame dynamically, and ported it as a snippet inside MODx - and I saw the power of MODx, how easy it is !
Anyway, here is the code for this snippet, everything is explained in the code. Enjoy, and comment !
Nice work and thanks for contributing! If you think it’s stable enough, please add it to the resource repository..
"He can have a lollipop any time he wants to. That's what it means to be a programmer."