Skip to main content
Participating Frequently
May 17, 2009
Question

How to have dynamic thumb folder selection?

  • May 17, 2009
  • 1 reply
  • 2399 views

I am creating a HTML gallery. I want to have a specific folder structure for each album. Now strugling with setting the directory for the thumbnail and photo folder in galleryinfo.lrweb:

The user can enter the albumfoldername, which by default is set on albumName:

["nonCSS.albumFolderName"] = "albumName",

Manually this works:

["photoSizes.photos.directory"] = "albumName",

But how to get the foldername entered by the user assigned or even the default value above? Tried several options but without luck. Best option would be (I think):

["photoSizes.photos.directory"] =function() return nonCSS.albumFolderName end,

Does somebody now how to get it working?

Jan-Willem

This topic has been closed for replies.

1 reply

Sean McCormack
Community Expert
May 17, 2009

Not sure, but maybe try this instead..

["photoSizes.photos.directory"] =function() return string.format( "%s", ( nonCSS.albumFolderName) ) end,

Sean McCormack. Author of 'Essential Development 3'. Magazine Writer. Former Official Fuji X-Photographer.
iamjwkAuthor
Participating Frequently
May 18, 2009

Did not work:

It looks like a function is not allowed as in the preview the thumbnail does contain an error message:

bad argument #1 to 'gfind' (string expected, got function)
Switch View

...ines\FotoKruse030_html.lrwebengine\FrameContent.html:12: in function 'func'
?: in function 'ThumbnailGridFunc'
...ines\FotoKruse030_html.lrwebengine\FrameContent.html:42: in main chunk

Played around to see what is possible and what not. Going back fixed parameters the following is accepted:

     ["photoSizes.photos.directory"] = string.format( "%s", "XXX"),


But the following experiments did not work:

         ["photoSizes.photos.directory"] = function() return string.format( "%s", ( nonCSS.albumFolderName) ) end,
         ["photoSizes.photos.directory"] = function() return string.format( "%s", nonCSS.albumFolderName ) end,
         ["photoSizes.photos.directory"] = function() return string.format( "%s", [[nonCSS.albumFolderName]] ) end,
         ["photoSizes.photos.directory"] = function() local pdir = string.format( "%s", "albums/2009/acid stim/photos"); return pdir end,
         ["photoSizes.photos.directory"] = function() return string.format( "%s", "XXX") end,

         ["photoSizes.photos.directory"] = string.format( "%s", ['nonCSS.albumFolderName']),
         ["photoSizes.photos.directory"] = string.format( "%s", nonCSS.albumFolderName),

So got the impression it does not work, unless somebody else has a bright idea or the adobe experts give a insight if this is possible or not.

Jan-Willem

Sean McCormack
Community Expert
May 18, 2009

Pardon me. I'll refrain from offering suggestions in future. 

Sean McCormack. Author of 'Essential Development 3'. Magazine Writer. Former Official Fuji X-Photographer.