TYPO3 - 具有数据属性的内联XML

时间:2018-03-31 13:29:45

标签: xml typo3 fluid typo3-8.x

我搜索解决方案,

我在TYPO3模板中有一个流畅/ HTML代码:

Sub SplitDocOnHeading1ToRtfWithoutHeadingInOutput()
'Splits the document on Heading1 style, into new documents, Heading1 is  included in the data.



Application.ScreenUpdating = False
Dim Rng As Range, DocSrc As Document, DocTgt As Document
Dim i As Long, StrTxt As String: Const StrNoChr As String = """*/\:?|"
Set DocSrc = ActiveDocument
With DocSrc.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Format = True
    .Forward = True
    .Text = ""
    .Style = wdStyleHeading1
    .Replacement.Text = ""
    .Wrap = wdFindStop
    .Execute
  End With
  Do While .Find.Found
    Set Rng = .Paragraphs(1).Range
    Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\HeadingLevel")
    Set DocTgt = Documents.Add(DocSrc.AttachedTemplate.FullName)
    With DocTgt
    Application.ScreenUpdating = False
      .Range.FormattedText = Rng.FormattedText
      StrTxt = Split(.Paragraphs.First.Range.Text, vbCr)(0)
      ' Strip out illegal characters
      For i = 1 To Len(StrNoChr)
        StrTxt = Replace(StrTxt, Mid(StrNoChr, i, 1), "_")
      Next
      .Paragraphs.First.Range.Delete
      .SaveAs2 FileName:=DocSrc.Path & "\" & StrTxt & ".rtf", Fileformat:=wdFormatRTF, AddToRecentFiles:=False
      .Close False
    End With
    .Start = Rng.End
    .Find.Execute
  Loop
End With
Set Rng = Nothing: Set DocSrc = Nothing: Set DocTgt = Nothing
Application.ScreenUpdating = True
End Sub

现在我需要在此代码中使用流式XML输出:{data.pi_flexform.items} 但它不起作用:

<div id="owl-main" data-owl-carousel='{"items":2}' ">

感谢您的帮助!

0 个答案:

没有答案