Setting Dynamic Media

Hi,

I’ve got a job where I have lots of different trays so wanted to assign the media dynamically to print context’s. I’ve tried the below which was suggested by a colleague but it isn’t working.

So the content I’m assigning is the media name but I’m fairly certain I’ve got the syntax wrong here

James

Using the following (just for testing) doesn’t work either?

Name: Example
Selector: html[section=‘A4_Landscape’] meta[name^=‘media’]

results.attr("content", "A4L_1");

And I assume that you do have these Media’s attached to your Template and that the record field “Tray” is equal to one of the case values?

Hi

yeah I have all of the media setup and the tray is set to either 2 or 4 on the pages, it’s just setting it to whatever the default is set to. I set the 1a to just make sure it wasn’t going into that loop by default

Please note that the media names “A4L_1”, “A4L_2”, “A4L_3”, A4L_4" and “A4L_5” doesn’t exist in the list of Media’s (shown in the shared screenshot).

Damn you are right, I didn’t notice that! That will be the problem then.

Thanks for your help on this