简体   繁体   English

Typo3页面树中元素的概述页面

[英]Overview page of elements from a Typo3 page tree

I'm primarily a UI and graphic designer and, eventhough I have some experience with Typo3, I'm completely stuck at the following problem: 我主要是UI和图形设计师,尽管我有Typo3的经验,但我完全陷入了以下问题:

I have a large page tree with single pages for items from a catalogue (one item per page), the layouts for these items are built with Armin Vieweg's beautiful "Dynamic Content Elements" extension (DCE) . 我有一棵大的页面树,其中有一个页面用于目录中的项目(每页一个项目),这些项目的布局是使用Armin Vieweg美丽的“动态内容元素”扩展(DCE)构建的。

Now I want to create an overview page where I reference some of those items automatically - ideally I want to check a box in each element I want to display there (I would add a field catalogueItemPreview to the item DCE which authors can check or uncheck). 现在,我想创建一个概述页面,在其中我会自动引用其中的一些项-理想情况下,我想在要显示在其中的每个元素中都选中一个框(我会在DCE项中添加一个catalogueItemPreview字段,作者可以检查或取消选中该字段) 。

Unfortunately, I have no concrete idea of how the database is structured and how I could build a query (where would I even do that? in a custom-made plugin?). 不幸的是,我对数据库的结构以及如何构建查询没有具体的想法(在定制插件中,我什至可以在哪里做?)。

This is how I imagine it could work: On the overview page I use a plugin/an extension in a Content Element that does the following: 这就是我想像的可行方式:在概述页面上,我在Content Element中使用了一个插件/扩展来执行以下操作:

  1. search Typo3 DB for content elements with a field called "catalogueItemPreview" 在Typo3 DB中搜索名为“ catalogueItemPreview”的内容元素

  2. return fields " catalogueItemTitle ", " catalogueItemShortDescription ", " cataloguePreviewImage " 返回字段“ catalogueItemTitle ”,“ catalogueItemShortDescription ”,“ cataloguePreviewImage

  3. use a template to render previews of all those elements on the overview page 使用模板在概述页面上呈现所有这些元素的预览

I'm happy for ANY pointers towards a solution as currently I'm completely in the dark about where even to begin ... 我很高兴能找到任何解决方案的指针,因为目前我完全不知道从哪里开始...

Schematic screenshot from the Typo3 backend Typo3后端的原理图屏幕截图

thanks for using my DCE extension :) 感谢您使用我的DCE扩展程序:)

Well the fields you have defined and their values in content elements are stored as XML, because the current version of DCE is based on Flexforms. 那么,您定义的字段及其在内容元素中的值将存储为XML,因为DCE的当前版本基于Flexforms。

This makes it very very difficult to do MySQL queries using one of the field properties in WHERE clause. 这使得使用WHERE子句中的字段属性之一进行MySQL查询非常困难。 You could check for a xml string in the field pi_flexform but this is not recommended. 您可以在字段pi_flexform检查xml字符串,但是不建议这样做。

Instead I would use another property of content elements (tt_content) to mark the items as "Show on frontpage". 相反,我将使用内容元素的另一个属性(tt_content)将项目标记为“在首页上显示”。 For example you could create a new layout or section_frame value for that. 例如,您可以为此创建一个新的layoutsection_frame值。 Then it is very easy to just output the elements you want, using TypoScript. 然后,使用TypoScript仅输出所需的元素非常容易。

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

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