Upload pictures in a fixed folder e.g. in /img/ instead /media/nodeid/file
Hi there,
where I work this is the lifecycle of a website: graphic designers create the designs and deliver photoshops files, Frontend developers cut the photoshop designs and create the HTML, CSS templates and all the pictures, and then the software engineers take care of putting all together in a CMS and deliver the final product.
The frontend developers usually put all pictures inside of /img and use them in the stylesheets. Sometimes some pictures are used for hover effects etc. for example a button called someitem_hi.png and someitem_lo.png (hover).
Normal and hover effects can easily be done via CSS or jquery (depends).
In the last website I created,I tried to make everything customizable via CMS, but I had to exclude some parts. Exactly the ones where a button (partner logo) has 2 icons (normal and hover).
If the customer wants to modify the icon, he can't, he has to call us and we have to manually change the picture. This happens in several parts of thw website, not a big deal but I think the issue will come in the future for other customers and I'd like to have already a solution for that.
Using "media" is not an option for me, as to get the media URL requires some code all the time (I created an helper method and still I don't think it's optimal), and it's not practical to maintain. We separate CSS in a .css file, we don't want to insert css inline in a razor view.
So now my question. How would you do to upload pictures in a separate fodler (e.g. /img) than "media"? Should I create a new section called e.g. "Pictures" and code a form to upload them, and a page to list/manage the pictures (manage would be: open the picture, or delete it)?
Is it possible to reuse some existing components from "media", for example the drag and drop etc.? What I probably need to change is the upload handler. Instead of creating a new node in the umbraco db, for the uploaded pictures, I need to put them in /img.
Before coding everything myself and reinventing the wheel it would be nice to hear from you.
I need a solution that possibly works for both umbraco 6 and umbraco 7. Maybe I can prepare a package for this.
Upload pictures in a fixed folder e.g. in /img/ instead /media/nodeid/file
Hi there,
where I work this is the lifecycle of a website: graphic designers create the designs and deliver photoshops files, Frontend developers cut the photoshop designs and create the HTML, CSS templates and all the pictures, and then the software engineers take care of putting all together in a CMS and deliver the final product.
The frontend developers usually put all pictures inside of /img and use them in the stylesheets. Sometimes some pictures are used for hover effects etc. for example a button called someitem_hi.png and someitem_lo.png (hover).
Normal and hover effects can easily be done via CSS or jquery (depends).
In the last website I created,I tried to make everything customizable via CMS, but I had to exclude some parts. Exactly the ones where a button (partner logo) has 2 icons (normal and hover).
If the customer wants to modify the icon, he can't, he has to call us and we have to manually change the picture. This happens in several parts of thw website, not a big deal but I think the issue will come in the future for other customers and I'd like to have already a solution for that.
Using "media" is not an option for me, as to get the media URL requires some code all the time (I created an helper method and still I don't think it's optimal), and it's not practical to maintain. We separate CSS in a .css file, we don't want to insert css inline in a razor view.
So now my question. How would you do to upload pictures in a separate fodler (e.g. /img) than "media"? Should I create a new section called e.g. "Pictures" and code a form to upload them, and a page to list/manage the pictures (manage would be: open the picture, or delete it)?
Is it possible to reuse some existing components from "media", for example the drag and drop etc.? What I probably need to change is the upload handler. Instead of creating a new node in the umbraco db, for the uploaded pictures, I need to put them in /img.
Before coding everything myself and reinventing the wheel it would be nice to hear from you.
I need a solution that possibly works for both umbraco 6 and umbraco 7. Maybe I can prepare a package for this.
Thanks and cheers,
Paolo
is working on a reply...