3 Replies Latest reply on Mar 16, 2018 10:35 PM by Nick Mignacca

    Need Help - Setting variable for landing page preview image IN EDITOR

    Nick Mignacca

      Hello everyone,

       

      I'm putting together a universal template for our content landing pages and want to be able to set a preview image variable for the page in the editor (as you would for say your banner).  Can it be done?

       

      We have managed to set a specific preview image in the template using the following code:

       

       

      <meta property="og:image" content="http://portals.keanewzealand.com/rs/836-JGU-553/images/kea-connect-preview.png">

       

       

      What we would however want is something along the lines of this (which doesn't work):

       

        <head>
          <meta charset="utf-8">
          <title>Landing Page</title>
          <link href="https://fonts.googleapis.com/css?family=Montserrat:100,200,300,400,500,600,700,800,900" rel="stylesheet">
          <meta name="author" content="">
          <meta name="keywords" content="">
          <meta name="description" content="">
          <meta property="og:image" content="{previewImg}">
          <meta property="og:type" content="website">
          <link rel="icon" type="image/x-icon" href="http://portals.keanewzealand.com/rs/836-JGU-553/images/favicon.ico">
          <link rel="icon" type="image/png" href="http://portals.keanewzealand.com/rs/836-JGU-553/images/favicon-32x32.png" sizes="32x32" />
          <link rel="icon" type="image/png" href="http://portals.keanewzealand.com/rs/836-JGU-553/images/favicon-16x16.png" sizes="16x16" />
          
          <!-- Marketo Variable Definitions -->
          <meta class="mktoString" id="logoLink" mktoName="Logo Link" default="https://www.keanewzealand.com/"> 
          <meta class="mktoString" id="previewImg" mktoName="Page Preview Image" default="http://portals.keanewzealand.com/rs/836-JGU-553/images/bannerBG.jpg">
      

       

      Any help would be much welcome.

       

      I am not a developer but I'm figuring out things as we go.  If we were able to do this sort of thing in the editor, it would both save the team having to mess around with coding, and allow us to have one universal template for most of our content.

       

      Thanks

       

      Nick