TYPO3:如何将页面内容插入模板 [英] TYPO3: How do I insert page content into template

查看:28
本文介绍了TYPO3:如何将页面内容插入模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些内容想要出现在我的 TYPO3 网站的多个页面上.我可以将其插入到模板中,但我也希望该内容可以在富文本编辑器中进行编辑.

I have some content that I want to appear on multiple pages of my TYPO3 site. I could just insert this into the template, but I also want that content to be editable in the Rich Text Editor.

所以我有了创建隐藏页面的想法,但我不知道如何将这些内容插入到模板中.

So I had the idea of creating a hidden page, but I don't know how to insert this content into a template.

它是否需要 select 排版语句?

Does it require the select typoscript statement?

此外,作为一个后续问题,我可以添加一些内容吗,仅包含具有此页面 ID 作为其在页面层次结构中的直接父级的页面.

Also, as a follow-up question, can I add something to say, only include pages that have this page id as their immediate parent in the page hierarchy.

推荐答案

我不太明白第二个问题.如果您只想在其他页面下的页面中包含某些记录,那么这显然会起作用:

I didn't quite get the second question. If you want to include some record only to pages under some other page, then this will obviously work:

[PIDinRootline = pages-uid, pages-uid, ...]
temp.foo = RECORDS
temp.foo {
    tables = tt_content
    source = ID # Enter the object's ID here
}
[end]

另一方面,如果您想包含来自其他页面的页面的所有记录,请尝试以下操作:

On the other hand, if you want to include all records from pages, being children of some other page, then try something like:

1 = CONTENT
  1.table = tt_content
  1.select {
    pidInList = parent-uid
  }

不知道我是否理解你的意思.德米特里.

Don't know if I got you right though. Dmitri.

这篇关于TYPO3:如何将页面内容插入模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆