Skip to main content

Hi,

 

For our transactional emails our data comes from our order management system as an XML file and we've been using XSLT to transform this into the HTML.

We've always loaded the XSLT into the classic content area, which I now see is being retired next month. 

I see that XSLT files can now be loaded into the content builder, but how do I transform this? Currently using %%=treatascontent(TransformXML(XMLinput, GetPortfolioItem("XSLT-File_name")))=%% but this doesn't work when the XSLT is in the content builder and I can't figure out what to change this to. Please help!!

2 risposte
  1. 5 lug 2023, 13:25

    Just to update on the above, as I could not get Base64Decode to work either.

     

    We now have it working wth the following:

     

    1. Copy and paste XSL code into a "Code Snippet" Content Block, copy the Content Block ID (Not as forgiving with minor errors in the XSL doc, ie: "&" needs to be &)

    2. In the header of the email update and add this code:

    <!-- %%[ var @XSLT,@XML

    SET @XML  = Trim(TheColumnNameOfTheXMLInDataExtension)

    SET @XSLT = ContentBlockByID("ContentBlockIDofCodeSnippet")

    ]%%-->

    3. Where you want your content block paste this code:

    %%=TreatAsContent(TransformXML(@XML,@XSLT))=%%

0/9000