简体   繁体   English

我如何将自己的HTML / FLUID模板用于TYPO3扩展(来自Repsository)

[英]How can I use my own HTML/FLUID Template for TYPO3 Extensions (from Repsository)

At my old TYPO3-Extension "dmmjobcontrol", I'm using my own HTML-Template via TypoScript 在我的旧TYPO3扩展名“ dmmjobcontrol”上,我通过TypoScript使用自己的HTML模板

plugin.tx_dmmjobcontrol_pi1.template.search = fileadmin/search.tmpl

Now, the new Extbase-Extension "Jobfair" ( http://docs.typo3.org/typo3cms/extensions/jobfair/Index.html ) uses FLUID Templates with ViewHelpers, Partials etc. 现在,新的Extbase-Extension“ Jobfair”( http://docs.typo3.org/typo3cms/extensions/jobfair/Index.html )将FLUID模板与ViewHelpers,Partials等一起使用。

How can I use my own HTML-Snippets for the Frontend? 如何为前端使用自己的HTML代码段? I can read FLUID-Templates and I can write my HTML at /jobfair/Resources/Templates/Job/ List.html into it. 我可以阅读FLUID-Templates,也可以将HTML写入/ jobfair / Resources / Templates / Job / List.html But after an Extension.Update my data will be lost. 但是在Extension.Update之后,我的数据将丢失。 How can I solve this? 我该如何解决? I can't style my Frontend with CSS only, it's impossible. 我不能仅使用CSS设置前端样式,这是不可能的。 I need several HTML-Tags at my template. 我的模板需要几个HTML标记。

How can I use my own Template at Extbase-Extensions? 如何在Extbase-Extensions中使用自己的模板?

Thanks for your help. 谢谢你的帮助。

Solution

In TypoScript Setup: 在TypoScript安装程序中:

plugin.tx_jobfair {

  view {
     templateRootPaths {
       100 = fileadmin/templates/static/jobfair/Resources/Private/Templates/
       #100 = EXT:jobfair/Resources/Private/Templates/
     }

     partialRootPaths { 
       100 = fileadmin/templates/static/jobfair/Resources/Private/Partials/
       #100 = EXT:jobfair/Resources/Private/Partials/
     }

     layoutRootPaths {
       100 = fileadmin/templates/static/jobfair/Resources/Private/Layouts/
       #100 = EXT:jobfair/Resources/Private/Layouts/
     }
  }

}

Before, copy the Resources-Folder from the Extenstion into your /fileadmin-Folder and make your changes at the templates .. 之前,请将资源文件夹从扩展复制到/ fileadmin-Folder并在模板上进行更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM