Re: Predictive content for media queries - background code

Phillip_Wild
Level 10

Predictive content for media queries - background code

Hi all

I've seen Marketo's predictive content tool through a webinar - you right click the content in the editor and click "Make Predictive." But how would this work if you want to use media queries, and switch content in and out?

Hopefully, there is a bit of code which you can use in Dreamweaver or similar to use predictive content and also control the size of the image and sub in and out content with media queries. Otherwise it's a bit restrictive - we code in Dreamweaver and import into Marketo, and never use the editor except to insert code.

Thanks!

Phil

3 REPLIES 3
JD_Nelson
Level 10 - Community Advisor

Re: Predictive content for media queries - background code

Best I've found is this:

<img width="179" border="0" style="width: 179px!important; height: auto!important; display: block;" src="{{predictive.image:default=layout-2;position-229905}}" />

I have not been able to determine what the Position reference is. I do know, if you duplicate this same code each time, you get the same piece of content. So obviously it has something to do with the rotation, but haven't figured it out just yet.

Phillip_Wild
Level 10

Re: Predictive content for media queries - background code

Thanks JD. Then there's the hyperlink part too! Tricky.

JD_Nelson
Level 10 - Community Advisor

Re: Predictive content for media queries - background code

<a href="{{predictive.content:default=layout-2;position-229905}}" target="_blank"><img width="179" border="0" style="width: 179px!important; height: auto!important;" src="{{predictive.image:default=layout-2;position-229905}}" /></a>