Can Templates render a description under the thumbnail?

<< How do I get meta tags in ...
Back to Portfolio FAQ index
Problems saving imported ... >>

Question: Can Portfolio/PortWeb render a 'banner' with file-description and/or keywords and/or other file-specific data onto a set of images (e.g. disk-previews), with the banner being part of the of the image?

This arose in the (now defunct) U-to-U forum. The user wanted to automate this work, having over 50.000 images to change. He wanted the solution to provide options to select font, size, font colour, background colour, position and opacity. Information would be drawn from a csv, txt, mdb, xls, dbf or similar file and detect file-specific data by filename. The process would then batch images. Oh, and the solution should not be an HTML one!

The last statement is the key. The short answer is no. Why? Because for the banner to appear in the visible image, the image must be edited which is not part of Portfolio's intended capability. By scripting Photoshop this could be achieved but careful planning would be needed to ensure the text submitted for the banner fitted the space available, e.g. an image with a short file name and 2 short keywords might be OK whereas the info for a long filename and 10 keywords might not fit.

HTML might not have been suitable for the person with the original request, but other users might want to know how to go about doing this using HTML templates. To get an idea of what was being asked for,

Bodnath, Buddhism, Kathmandu, Nepal, Stupa
Photo: M Schaefer  NEP-1999 12-MS-0038   ©2001 lightbox
This is the originally supplied example with imposed text saved as part of the image. This is a mock-up of the original image at left with the 'banner' rendered in HTML.

Though the HTML source code on this page for the above demo uses actual values for the data, it represents actual PortWeb output.

The HTML code copes with font colour and face without problem., but to get exactly the font size needed for your banner you'll need to use Style sheets (CSS) instead of HTML - but you can see the idea. The actual text is created by using PortWeb placeholders in the HTML template - e.g. %Keywords%, etc. Note that you can't control the order that keywords or other multi-value field list values get passed from PortWeb (though JavaScript could be used for this purpose).

The actual template used would look something like this (note some placeholders are for custom fields):

<head><title> Portfolio -%page%/%TotalPages%</title></head><body bgcolor=#FFFFFF text=#000000><form><table border="0" cellspacing="30">
<td align="left" width="200">
<td><img src="%thumbnail%"></td>
<td align="left" width="200" bgcolor="#000000">
<font face="Arial" size="2" color="#FFFFFF">
<br />
%Author%&nbsp;&nbsp;%SerialNum%&nbsp;&nbsp;%Copyright%<br />
<a href="%prev%">Previous Page</A>
<a href="%next%">Next Page</A>

Lastly, remember that the number of data 'cells' (effectively data <TD>s) per page of output template is set by creating and/or importing the template to Portfolio, opening the template in the Edit HTML Dialog and setting the 'Table Grid' boxes for the number of rows and columns required - the default is 2x2 (see Manual page 277).

Question: Can Templates render a description under the thumbnail? [FAQ00049.htm]
Last Update:- 02 June 2006

<< How do I get meta tags in ...
Back to Portfolio FAQ index
Problems saving imported ... >>

Quick Search of PortfolioFAQ (word, words or phase): or try the Advanced Search

User-to-User Forums  |  Report error/typo/broken link  |  Request new topic  |  Ask a question

Site and articles © Mark Anderson 2001-2007 - Visit my home page

This FAQ is created and maintained using
Friday logo
Friday - The Automatic FAQ Maker