TYPO3:如何将页面内容插入模板
我有一些内容想要出现在 TYPO3 网站的多个页面上。 我可以将其插入模板中,但我还希望该内容可以在富文本编辑器中编辑。
所以我有了创建隐藏页面的想法,但我不知道如何将此内容插入到模板中。
它是否需要 select
打字语句?
另外,作为后续问题,我可以添加一些内容吗?仅包含将此页面 ID 作为页面层次结构中直接父级的页面。
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.
Does it require the select
typoscript statement?
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不太明白第二个问题。
如果您只想将某些记录包含到其他页面下的页面,那么这显然会起作用:
另一方面,如果您想包含页面中的所有记录,作为其他页面的子页面,那么请尝试以下操作:
Don'不知道我是否理解对了你。
德米特里。
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:
On the other hand, if you want to include all records from pages, being children of some other page, then try something like:
Don't know if I got you right though.
Dmitri.
来自在每个页面上包含typo3内容元素:
注意ID是内容记录ID,而不是页面ID。
但这并不能回答如何仅包含特定父级的页面/记录的问题。
From Include typo3 content elements on every page:
Note the ID is the content record ID, not the page ID.
But that doesn't answer the question of how to only include pages/records with a certain parent.
您可以设置隐藏页面,然后根据需要通过页面(或下面的整个页面树)上的打字稿“导入”给定页面上的内容元素。
“技巧”是将 colPos 与 select 语句一起使用。 通过此功能,您甚至可以将多个(不同)内容元素放入一个(隐藏)页面中,这些内容元素显示在不同页面上(取决于它们所在的列的设置。
示例:
。
请
注意
,您根据已设置内容元素的列来设置 colPos,否则
您可以使用不同的列来对必须显示/应该显示的不同内容执行此操作 。不显示在特定页面上。
这也适用于系统文件夹和非隐藏页面。
如果您使用 TemplaVoila,这也应该可以工作,尽管您必须切换到列表视图才能查看和设置内容元素的列(如果没有对此非管理员用户隐藏)。
要找出哪个 colPos-number 是列的哪个位置,请转到 phpMyAdmin 并在 tt_content 表中搜索字段“colPos”。
You can set up a hidden page and then "import" the content elements on a given page via typoscript on the pages (or the entire page tree below) as needed.
The "trick" is to use the colPos with the select-statement. With this you can even put multiple (different) content elements in one (hidden) page that show up on different pages (depending on the setting of the column they are "in".
Example:
.
.
.
Watch out, that you set the colPos according to the column that you have set the content element into, otherwise it just will not show.
You can use different columns to do this for different content that has to show up/should not show up on a particular page.
This also works with sytemfolders and non-hidden pages.
If you use TemplaVoila, this should also work although you have to switch to the listview to see and set the colum for the content element (if not hidden for this non-admin user).
To find out which colPos-number is which position of the column go to the phpMyAdmin and search for the field "colPos" in the tt_content table.