displaying version placeholder in thumbnail info

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

displaying version placeholder in thumbnail info

Post by doug_w » 06 May 14 2:21

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 1644 times
photography.dougwieringa.com

Hert
Posts: 5873
Joined: 13 Sep 03 7:24

Re: displaying version placeholder in thumbnail info

Post by Hert » 06 May 14 10:17

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 which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

doug_w
Posts: 22
Joined: 14 Apr 08 3:52

Re: displaying version placeholder in thumbnail info

Post by doug_w » 06 May 14 17:31

Perfect. Thanks!
photography.dougwieringa.com

Post Reply