Linking photos in Dreamweaver
December 1, 2008 5:20 AM   Subscribe

Dreamweaver DX help needed - simple but repetitive linking task.

I have a large table into which I've dragged a few hundred thumbnails, and now need to link those to their larger counterparts all of which have the same name as their respective thumbnails but are in a separate folder. Can Dreamweaver automate this task? Can Dreamweaver rename all of the pictures numerically based on the order in which they now appear in the table to facilitate this task?
No RTFM responses, please - I've dug around a bit.
posted by fish tick to Computers & Internet (7 answers total)
 
Best answer: Your doing it wrong...

Wouldn't it be easier to export an image gallery from an application that can do this (such as Picasa)? Or use an image gallery application.
posted by SirStan at 6:13 AM on December 1, 2008


I don't use Dreamweaver myself, but this is a fairly trivial thing to do with regular expressions. A quick Google found an introduction to regular expressions in Dreamweaver.
posted by mandal at 6:17 AM on December 1, 2008


Best answer: As far as I know DW does not have a batch file renaming tool, however newer versions of Photoshop do (7 and higher I think), and you can probably google around for a freebie utility.

Photoshop, iPhoto, Picasa, and other apps can all auto generate an HTML gallery for you.

It will be far less work to use one of these apps, and then doctor up the resulting up HTML in Dreamweaver.

Dreamweaver does have a number of macro-recording utilities, which might help as well.

In the past I've used Excel (or your favorite spreadsheet tool) to bang together repetitive HTML. There are various tricks to get a list of files from your hard-drive into a text file. In Mac OS X you can just copy and paste from the file system. In Windows you can output a directory listing to a text file.

In either case, paste the list of file names into a column in your spreadsheet. In the surrounding columns add in the HTML bits, the table cells, the anchor tag, etc. You may need several columns. When you have all the HTML in order, copy and paste it into DW and find/replace out all the whitespace/tabs.
posted by device55 at 6:36 AM on December 1, 2008


Response by poster: Thanks - I'd been resisting Picasa for a few reasons, but time is of the essence and I will give in.
posted by fish tick at 7:15 AM on December 1, 2008


For straight up renaming, this free thing might work.

For a list of files, if you are command line savvy (I'm assuming you are running Windows), execute this command:
dir /b > dir.txt
and then just
dir.txt
which will open the contents of a folder into a Notepad window (assuming Notepad is the registered application for .txt files, of course). Then copy into Excel for a row-by-row list of filenames you can append (and prepend) HTML to.

Copy-pasting Excel into a Notepad window will give you tab-delimited text. If you copy-paste the invisible "Tab" character (looks like a bunch of spaces but is only selectable as one "unit"), you can do a global find-replace of tabs to 'nothing' (leave the field blank). Then copy-paste the resultant text from Notepad into DreamWeaver's source view. There you have it - semiautomated HTML generation.

(DreamWeaver's find-replace implementation irritates me for some reason)
posted by ostranenie at 8:03 AM on December 1, 2008


Best answer: If you have Fireworks, this might save you a lot of time in the future!
posted by djgh at 4:00 PM on December 1, 2008


Response by poster: Thanks, all- I ended up using Picasa in the interests of speed. I do have Fireworks, and will look into the album thing for future reference.
posted by fish tick at 8:46 PM on January 1, 2009


« Older Uniquely Belgian liquor?   |   A good resoling place in NYC? Newer »
This thread is closed to new comments.