Quote from: waso at Sep 26, 2006, 09:28 AM
The proper way to add scaling, cropping and thumbnailing of images to MODx would be with a widget?
I assume that Template Variables and Widgets are part of the core code and the user is not meant to add new widgets?
Proper in MODx is generally whatever approach best meets your specific site requirements/needs. The built-in widgets do not provide this capability.
Quote from: waso at Sep 26, 2006, 09:28 AM
Is there a way to retrieve the raw value of a Template Variable that has already a widget assigned?
Yes, there are API functions to retrieve template variables, including the widget properties.
Quote from: waso at Sep 26, 2006, 09:28 AM
Would it be a good idea to add a Template Variable "Image List" to the available TVs so that creators of gallery snippets could plug into that, and need not develop a own user interface for adding images?
That’s not a bad idea, but I’d rather see this happen following some upcoming refactorings that will make creating a distributing these widgets (and template variables) as add-on packages which can be used like libraries of building blocks for custom galleries (or any other web application).
Quote from: ajayre at Sep 26, 2006, 11:53 AM
I think widgets are applied to the output of a template variable, so if you do your image resizing there then it will happen every time you load the page, which would be a bad idea. It’s better to create the thumbnails one time only and then display them when needed.
Actually, widgets do define both output and input behavior (via the manager or QuickEdit) when configuring a TV.
Quote from: ajayre at Sep 26, 2006, 11:53 AM
Maxigallery creates thumbnails and displays them, so that might be an option. Maxigallery is a snippet.
Right, creating snippets to do this is probably the best approach to such things right now, and you can use those within TV’s in various ways, as well. In the future, I am planning on making Widgets be classes so managers can override core widgets or add their own custom ones which can filter output for both rendering and managing the TV’s.