簡體   English   中英

TYPO3流體模板中的圖像映射

[英]image-map in TYPO3 fluid templates

我正在用extbase和fluid為TYPO3編寫擴展。 在這里,我想顯示一個圖像地圖。 問題在於,流體引擎將我的<map>-標記及其所有<area>-標記包裝在雙引號中,並將它們輸出到<p>-標記中。

<map></map>

變成

<p class="bodytext">    &lt;map&gt;</p>
<p class="bodytext">    &lt;/map&gt;</p>

我已經嘗試過將其包裝在以下視圖幫助器中

<f:format.{raw,html,...}>
<![CDATA[]]>

有人以前有這個問題嗎?

編輯:

<f:layout name="Default" />
This Template is responsible for creating a table of domain objects. If
you modify this template, do not forget to change the overwrite settings
in /Configuration/ExtensionBuilder/settings.yaml: Resources: Private:
Templates: List.html: keep Otherwise your changes will be overwritten
the next time you save the extension in the extension builder

<f:section name="main">
 <f:image src="{f:uri.resource(path:'Images/Basemap.png')}"
  alt="Basemap" class="map" id="map" usemap="#StateLocations" />
 <table id="test"></table>
  <f:format.raw>
   <div id="themap"></div>
  </f:format.raw>
  <f:flashMessages />
  <f:format.raw>
   <map></map>
  </f:format.raw>
 </f:section>

編輯2:

<div class="tx-myext">
 <f:render section="main" />
</div>

您可以使用f:format.html viewhelper,而無需任何parsefunc

<f:layout name="Layout" />
<f:section name="MySection">
    <f:format.html parseFuncTSPath=""><map></map></f:format.html>
</f:section>

我真的不知道為什么要包裝map-tag,但是在我的測試用例中,它不需要任何parsefunction。

編輯:

<map></map> <!-- output <map></map> -->
<f:format.html parseFuncTSPath=""><map></map></f:format.html> <!-- output <map></map> -->
<f:format.html><map></map></f:format.html> <!-- output <p class="bodytext">&lt;map&gt;&lt;/map&gt;</p> -->

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM