Forum Moderators: not2easy

Message Too Old, No Replies

photoshop variable slices for buttons

layer based slices to dynamically create buttons

         

bgirl

6:06 am on Sep 13, 2006 (gmt 0)

10+ Year Member



I'm setting up a template for a whole bunch of buttons and discovered variable data and layer based slices in Photoshop/ImageReady.

To use it for a button for example, you'd set up a text layer and pixel layer then go to Image > Variables > Define. Choose your text layer and type in a name for that data set (you type a name for each combo of pictures and text). Next you type in the text you want, switch to the image and browse to an external jpeg to replace your placeholder pixel layer. You can even import a csv or tab file with the image location and text names already typed in.

The layer-based slices work nicely because they change size based on what content is in the layer. (as opposed to user-slices which are a fixed size). This is good. If the layer slice is set up on the text layer, the width/height of the slice will change with the text when you export the dataset. (which by the way is File > Export > Data Sets as Files).

Where I am stuck is getting a button background to work with the layer based slices and data. OK, say the button has rounded corners. Each slice will be a different width/height that scales based on the TEXT. I want the button background to scale with the text when it exports, but can't figure out how to do that. Can you link a graphic to text to do that? Using layer effects is one possibility, but as far as I know there is no way to use an image background there.

My other alternative is after creating the text plus 'square' cropped buttons, to run an action that will add the rounded corners. I'd prefer to do it all at once and not have to either try to match up gradients or mess with transparency fringe.

Maybe someone has a better way? I was just thrilled to find the variable data option in Photoshop, and I suspect it is under-used. If the function were spruced up a bit for CS3...

limbo

12:02 pm on Sep 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Good find bgirl.

I haven't used this much as most of the button work done round here is fireworks based.

Auto generating buttons for large sites using data-sets like this could be a useful time saver - personally I'm a total pedant for detail and like to create everything by hand to get it just the way I like it ;)

Your problem is one that mightn't get too many replies as it is very specific to the software - I always hesitate to direct traffic away from here but feel that you may have more luck with the Adobe Photoshop & Imageready help files in this case.