【问题标题】:image-map in TYPO3 fluid templatesTYPO3 流体模板中的图像映射
【发布时间】:2013-10-23 14:55:29
【问题描述】:

我正在为 TYPO3 编写一个带有 extbase 和流体的扩展。在这里,我想展示一个图像地图。问题在于,流体引擎将我的 -tag 及其所有 -tags 用双引号括起来,并在

-tag 中输出它们。

<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>

【问题讨论】:

  • 不,我在扩展模板中使用它们,在我的例子中是 Resources/Private/Templates/Location/ShowMap.html。
  • 我编辑了我的原始帖子。
    有一个非常丑陋的 js-hack,我不太幸运......
  • 我附上了,不是很复杂...是extension builder扩展生成的。
  • 奇怪,不知道,看起来你用 f:format.html 包裹了整个部分,但你没有......帮不了你,对不起。
  • 有趣的是它只在扩展模板中。如果我将地图放在主模板中,它会直接进入网站...

标签: php typo3 imagemap fluid extbase


【解决方案1】:

你可以使用 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> -->

【讨论】:

  • 同样的问题....你能粘贴你的布局和模板文件,这样我就可以在我的系统上测试它了吗?
  • 您使用哪种流体版本?
  • 与typo3 6.1.5捆绑的那个,根据扩展管理器,版本6.1.0。
  • 我使用相同的版本,一切都很好。我的最后一个想法是删除所有缓存,或者你有一些 stdWrap 覆盖
  • 不是我所看到的......在我的typo3-template中,也不是在我的扩展ext_typoscript_{constants,setup}.txt中。我一直在删除缓存,所以我认为这不是问题...
猜你喜欢
相关资源
最近更新 更多
热门标签