2

We're having problems with our content syndication and ampscript. The content pulls through to the email ok, and links appear to be pointing to the right place when in preview and test. However when we send a test with system link enabled (and the link passes through MC then redirects) the link no longer works.

Here is our code:

    <!-- 3col-3image-3text start -->

  <div title="Triple Article">
   <table border="0" cellpadding="0" cellspacing="0" style="min-width:100% !important;" width="100%">
    <tr>
     <td align="center" class="MainText TripleOuter" style="title:Main Text; font-family:Arial,sans-serif; font-size:12px; line-height:1.2; color:#131C1C; padding: 10px 15px 10px 15px ;">
      <table border="0" cellpadding="0" cellspacing="0" class="CC_NoEdit" width="100%">
       <tr>
        %%[Var @xml, @count, @titles, @title, @locs, @loc, @sals, @sal, @descs, @desc, @links, @link, @logos, @logo
        Set @xml = HTTPget("https://pmjobs.cipd.co.uk/widget/jobs/;i=27")
        Set @titles = BuildRowsetFromXML(@xml,"//Jobs/Job/Title",1)
        Set @locs = BuildRowsetFromXML(@xml,"//Jobs/Job/LocationDescription",1)
        Set @sals = BuildRowsetFromXML(@xml,"//Jobs/Job/SalaryDescription",1)
        Set @descs = BuildRowsetFromXML(@xml,"//Jobs/Job/ShortDescription",1)
        Set @links = BuildRowsetFromXML(@xml,"//Jobs/Job/DetailsUrl",1)
        Set @logos = BuildRowsetFromXML(@xml,"//Jobs/Job/LogoUrl",1)


        IF RowCount(@titles) > 3 THEN
        SET @rows = 3
        ELSE
        SET @rows = RowCount(@titles)
        ENDIF


        IF @rows >= 1 THEN
        for @count = 1 to @rows do
        Set @title = Field(Row(@titles,@count),"Value")
        Set @loc = Field(Row(@locs,@count),"Value")
        Set @sal = Field(Row(@sals,@count),"Value")
        Set @desc = Field(Row(@descs,@count),"Value")
        Set @link = Field(Row(@links,@count),"Value")
        Set @logo = Field(Row(@logos,@count),"Value")

        ]%%
        <th align="left" class="MainText MobBlock MobFullWidth CC_NoEdit" style="font-weight:normal;display:inline-table !important;padding:0px;margin:0px;border:0px;float:left; title:Main Text; font-family:Arial,sans-serif; font-size:12px; line-height:1.2; color:#131C1C;" valign="top" width="190">
         <div>
          <table border="0" cellpadding="0" cellspacing="0" class="MobFullWidth CC_NoEdit">
           <tr>
            <td align="left" class="MainText TripleColumn" style="title:Main Text; font-family:Arial,sans-serif; font-size:12px; line-height:1.2; color:#131C1C; padding: 10px 10px 10px 10px ;" valign="top" width="100%">
             <div>
              <table border="0" cellpadding="0" cellspacing="0" class="OneColumnMobile" style="min-width:100% !important;" valign="top" width="100%">
               <tr>
                <td style="padding: 0px 0px 0px 0px ;" valign="top" width="1%">
                 <div style="text-align: center;"> <img src="https:%%=v(@logo)=%%" style="width:100%; height:auto; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; text-align:center; padding:0px; float:left;" width="170"></div>
                </td>
               </tr>
              </table>
              <table border="0" cellpadding="0" cellspacing="0" class="CC_NoEdit" width="100%">
               <tr>
                <td align="left" class="HeadingDividerPadding" style="height:1px;line-height:1px; padding: 6px 0px 1px 0px ;">
                 <table border="0" cellpadding="0" cellspacing="0" style="width:100%;font-family:Arial,sans-serif; font-size:12px;">
                  <tr>
                   <td style="padding:0 0 5px 0; color:#1c1c1c; font-weight:bold; text-decoration:none; font-family:Arial,sans-serif; line-height:18px; font-size:16px;">
                    <a href="%%=v(@link)=%%" style="color:#1c1c1c; font-weight:bold; text-decoration:none; font-family:Arial,sans-serif; line-height:18px; font-size:16px;" target="_blank">%%=v(@title)=%%</a>
                   </td>
                  </tr>
                 </table>
                </td>
               </tr>
              </table>
              <table border="0" cellpadding="0" cellspacing="0" style="width:100%;font-family:Arial,sans-serif; font-size:12px;">
               <tr>
                <td style=" line-height:18px; padding:2px 0 5px 0; color:#E8182C;">
                 %%=v(@locs)=%%
                </td>
               </tr>
              </table>
              <table border="0" cellpadding="0" cellspacing="0" style="width:100%;font-family:Arial,sans-serif; font-size:12px;">
               <tr>
                <td style=" line-height:18px; padding:2px 0 5px 0; color:#1c1c1c;">
                 Salary: %%=v(@sal)=%%
                </td>
               </tr>
              </table>
              <table border="0" cellpadding="0" cellspacing="0" style="width:100%;font-family:Arial,sans-serif; font-size:12px;">
               <tr>
                <td style=" line-height:18px; padding:2px 0 5px 0; color:#1c1c1c;">
                 %%=v(@desc)=%%
                </td>
               </tr>
              </table>
              <table border="0" cellpadding="0" cellspacing="0" class="ButtonRound ButtonBGColor CC_NoEdit primaryColorBorder" style="width:100% !important;">
               <tr>
                <td style="margin:0; padding: 5px 0 0 0;">
                 <table border="0" cellpadding="0" cellspacing="0" class="ButtonRound ButtonBGColor CC_NoEdit primaryColorBorder" style="min-width:100% !important; border: 1px solid #E8182C;width:100%;" width="100%">
                  <tr>
                   <td align="center" class="ButtonText Button" style="font-family:Arial,sans-serif; text-decoration:none; line-height:20px; color:#E8182C; padding:8px 25px 8px 25px; width:100%;" valign="top" width="100%">
                    <div style="color:#E8182C;width:100%; min-width:100%!important;"> <a class="ButtonText" href="%%=v(@link)=%%" style="font-family:Arial,sans-serif; font-size:12px; text-decoration:none;line-height:20px; color:#E8182C;">Find out more</a></div>
                   </td>
                  </tr>
                 </table>
                </td>
               </tr>
              </table>
             </div>
            </td>
           </tr>
          </table>
         </div>
        </th>
        %%[
        NEXT @COUNT

        ENDIF
        ]%%
       </tr>
      </table>
     </td>
    </tr>
   </table>
  </div>
  <!-- 3col-3image-3text end --> 

1 Answer 1

3

Instead of outputting your link with:

%%=v(@link)=%%

use

%%=RedirectTo(@link)=%%

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .