doolak Posted December 30, 2012 Share Posted December 30, 2012 Will there be the possibility to resize an image and set alignment manually - like it is provided when you add an image through TinyMCE? Is something like this planned for future releases for the Inputfieldmage? I usually provide an extra field where the client can choose between "left", "right", "centered" and "none". Same would be possible for the image size, but it would be nicer if the client could do that "on the flow" with having the possibility to preview the size. Cheers, Christian Link to comment Share on other sites More sharing options...
diogo Posted December 30, 2012 Share Posted December 30, 2012 I don't think something like this is going to happen on the degault field, because PW doesn't make any assumptions concerning your markup or css. What you can do is copy the Inputfieldimage module and add a dropdown or radio field to it, so you have that options also with multiple images. The preview thing won't be that simple, but have a look at Nico's preview module, maybe it will be useful in this situation. 1 Link to comment Share on other sites More sharing options...
teppo Posted December 30, 2012 Share Posted December 30, 2012 I'm not sure that these options should really be combined with the image itself. I do understand your point and the needs you have here, but in my opinion these options are very closely related to markup generation and styling of the page and that's not something an image field should have an effect on. The fact that ProcessWire itself doesn't create / affect markup in any way is exactly what many of us like so much about it. What you've described above sounds to me like a very good way to handle this, as long as these settings are page-specific. On the other hand if they're image-specific I'd suggest looking into repeaters, since this kind of behavior would be very easy to put together there. Creating a new module, like @diogo suggested above, is always one solution - but in my opinion that sounds slightly overkill for this particular case. Link to comment Share on other sites More sharing options...
doolak Posted December 30, 2012 Author Share Posted December 30, 2012 (edited) I agree absolutely - i love the fact that ProcessWire does not affect the markup in the way a lot of other CMS do - so i think it's really better to use an extra field for the image alignment setting, because in that way the developer can specify the markup himself. Same for the possibility of setting a link to a bigger version - here it's the best if i can specify the markup myself. Regarding the resize option i am a little unsure - of course i can use an extra field where the client can enter the width and the hight, or maybe just one of them. But as the markup for showing a picture in another size than it is saved on the server does not give us much variations, i wouldn't mind to have such an option in the ImageFieldType if this would give the client the possibility to see live how the size is changed and resize it by dragging, like in TinyMCE. Another advantage would be that resizing could be handled proportional and the client is not allowed to enlarge the picture bigger than the original size. And as nothing else could be generated than a markup like width="x" height="y" i don't feel that it's that uncontrolled affection of the markup we try to avoid through the CMS. If i would have the option to decide, if this resize option is shown or not - this would be perfect. Edit: It would even be possible that the "resizer" just collects the two values and we have still full control over the markup. On the other hand if they're image-specific I'd suggest looking into repeaters, since this kind of behavior would be very easy to put together there. Yes, i usually do it like that. Edited December 30, 2012 by doolak Link to comment Share on other sites More sharing options...
doolak Posted December 30, 2012 Author Share Posted December 30, 2012 The preview thing won't be that simple, but have a look at Nico's preview module, maybe it will be useful in this situation. http://processwire.c...processpreview/ Thanks for that hint, diogo - this seems to be an option and is very useful in general. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now