1

我必须将静态 HTML 网站迁移到 TYPO3。我知道,我可以先阅读文档,但我相信我需要先阅读几天才能确定要运行的方向......

我是否必须像 Def​​ault PAG page = PAGE page.typeNum = 0 那样学习 TypoScript

page.20 = 文本 page.20.value = 你好宇宙!

page.10 = 文本 page.10.value = 你好世界!

还是有另一种方法可以快速做到这一点?用标记?

感谢你们!

4

2 回答 2

4

You will have to learn a little bit of TypoScript to do what you want. Sorry :-( But you won't have to learn that much, and what you do learn you'll be able to reuse when building other TYPO3 sites.

First thing: skip markers. Markers are a remnant of an old, deprecated templating system. The way you should be doing this is with TemplaVoila.

TemplaVoila works by giving you an interface to map TYPO3 content (or instructions to generate content) to blocks of markup in your HTML file. In other words, you take your static HTML file, then go through it and tell TemplaVoila "OK, that DIV is my sidebar, so put a list of all the site pages in there... that P is the footer, put a link to the privacy policy there... that DIV is the main content area, fill it with blocks of content created by the user," and so forth. This is a very powerful approach, because it means that if you work with other Web designers or graphic designers, they don't have to learn any special "magic tags" or markers; they can just give you well-formed HTML and with a few clicks you can turn it into a live template for a site. Pretty nifty.

There's a piece of TYPO3 documentation called "Futuristic Template Building" that explains pretty clearly how to go from a static HTML page to a TYPO3-ized site with TemplaVoila. Here's a direct link to the section of that doc that walks you through the process. (Don't be scared by the word "futuristic" into thinking that TemplaVoila isn't fully baked yet -- that doc was written six years ago, when TemplaVoila was pretty futuristic, but today it's quite mature and in use on TYPO3 sites all over the world.)

This should be enough to get you started, but if you hit roadblocks or can't wrap your head around it feel free to post your questions back to this thread and I'll help you out.

于 2010-11-23T00:35:55.730 回答
3

我正在恢复这一点,因为自 2010 年以来发生了很多事情。

TYPO3 中有多种方法可以进行模板化。所有这些都涉及 TypoScript,但在某些情况下只需要最少量的 TS。

  1. 使用“旧的内置方式”,在 TypoScript 和一些带有标记的 HTML 模板中进行所有渲染。在这种方法中,您将使用核心提供的内容元素。它们的渲染是在核心扩展“CSS Styled Content”中使用 TypoScript 定义的。
  2. 使用“新的内置方式”。在这里,您还可以使用核心提供的内容元素,以及可选的自定义元素。使用流体模板引擎进行渲染。您可以使用核心扩展“Fluid Styled Content”来做到这一点。这从7.5 版开始可用。
  3. 使用第三方扩展来渲染内容元素。我知道这些:

    • Templavoilà - 你可能不应该使用它,因为它不再被积极开发,虽然有一个版本声称与 TYPO3 7 LTS 兼容,但我对此知之甚少。
    • FluidTYPO3 - 这是一个完整的扩展生态系统,您可以使用流体模板引擎(后端表单、后端预览和前端渲染)完全定义页面模板和内容元素模板。它还提供了一种嵌套内容元素的机制。
    • DCE - 动态内容元素。我对它们一无所知,您需要阅读文档。
    • Mask - TYPO3 核心附近的向导,用于自己的内容元素和页面模板。使用数据库字段,而不是 flexforms。
    • 更多我不知道的扩展。

在这里详细解释所有这些会有点多。我目前个人最喜欢的是 FluidTYPO3 生态系统,但我正在考虑改用 Fluid Styled Content,因为它直接集成到核心中。我不确定它是否支持嵌套的内容元素,所以可能需要一个单独的解决方案(例如 extension gridelements)。

于 2015-10-23T10:22:45.523 回答