displaying version placeholder in thumbnail info

Post Reply
doug_w
Posts: 22
Joined: 14 Apr 08 2:52

displaying version placeholder in thumbnail info

Post by doug_w »

Can the version placeholder be displayed in the custom thumbnail info? If so, what's the code?

Thanks.
Attachments
thumb.jpg
thumb.jpg (10.72 KiB) Viewed 3086 times
photography.dougwieringa.com
Hert
Posts: 7870
Joined: 13 Sep 03 6:24

Re: displaying version placeholder in thumbnail info

Post by Hert »

Hi Doug,

For the next update (1031) I've added a macro command for this; %CatalogPlaceholderList

Also...
Can the version placeholder
Keep in mind that one image can be assigned to multiple version placeholders.

For now you can achieve the same with a script (just copy/paste the entire script to a custom thumb info line).

Code: Select all

%code
var
  ACatItem, AMain: TCatalogItem;
  APhs: TCatalogPlaceHolders;
  i: Integer;
begin
  result := '';

  ACatItem := TCatalogItem.Create(nil);
  AMain := TCatalogItem.Create(nil);
  try
    if Catalog.FindVersionImage(ImageItem, ACatItem) then
    begin
      if Catalog.FindMainVersionForItem(ACatItem, AMain) then
      begin
        APhs := TCatalogPlaceHolders.Create(TCatalogPlaceHolder, '');
        try
          Catalog.EnumPlaceHoldersForVersionInMain(AMain, ACatItem, APhs);
          for i := 0 to APhs.Count - 1 do
            result := result + iif(i = 0, '', ',') + APhs.Items[i].PlaceHolder;
        finally
          APhs.Free;
        end;
      end;
    end;
  finally
    AMain.Free;
    ACatItem.Free;
  end;
end;
%/code
Hope that helps
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
doug_w
Posts: 22
Joined: 14 Apr 08 2:52

Re: displaying version placeholder in thumbnail info

Post by doug_w »

Perfect. Thanks!
photography.dougwieringa.com
Post Reply