我必须将静态 HTML 网站迁移到 TYPO3。我知道,我可以先阅读文档,但我相信我需要先阅读几天才能确定要运行的方向......
我是否必须像 Default PAG page = PAGE page.typeNum = 0 那样学习 TypoScript
page.20 = 文本 page.20.value = 你好宇宙!
page.10 = 文本 page.10.value = 你好世界!
还是有另一种方法可以快速做到这一点?用标记?
感谢你们!
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 年以来发生了很多事情。
TYPO3 中有多种方法可以进行模板化。所有这些都涉及 TypoScript,但在某些情况下只需要最少量的 TS。
使用第三方扩展来渲染内容元素。我知道这些:
在这里详细解释所有这些会有点多。我目前个人最喜欢的是 FluidTYPO3 生态系统,但我正在考虑改用 Fluid Styled Content,因为它直接集成到核心中。我不确定它是否支持嵌套的内容元素,所以可能需要一个单独的解决方案(例如 extension gridelements
)。