Jump to content

Different Image Libraries Based on Country


Recommended Posts

I have a need to use different images based on a country chosen.

 

I have been able to make it work using a large, nested and tiresome rule and wondered if there was a more elegant way.

 

Basically I'd like the user to choose a country from a drop-down. Based on the country chosen, some images would then be available, whilst the balance of the library would not be available.

 

Any idea if this is possible?

Link to comment
Share on other sites

Would something along the lines of this work:

//custom path to correct folder for each country
// this line could be put in OnRecordStart callback rule to apply to multiple
// image rules if necessary
var path = "jobs/Projects/Postcard/Countries/" + Field("Country") + "/";

// chosen image pulled from correct sub-directory
var image = CreateResource(path + Field("Picture") + ".jpg","graphic",true);

return image;

Edited by esmith
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...