Skip to main content
Level 9
March 27, 2017
Question

Predictive content for media queries - background code

  • March 27, 2017
  • 1 reply
  • 1450 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Community Advisor
September 7, 2017

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.

Level 9
September 7, 2017

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

Community Advisor
September 7, 2017

<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>