TYPO3 - 使用扩展名 "Myleaflet" 创建网站

TYPO3 - create a website using the extension "Myleaflet"

我需要你的帮助。我仍然是使用 TYPO3 的初学者...

我想制作一张带有传单的互动卡片。 然后我在 TYPO3 版本中找到了一个扩展名“Myleaflet”。 10.4.21。 我安装了扩展程序“Myleaflet”并将其包含在我的新网站的模板中。 (还有流畅的内容 + CSS)

现在我必须添加页面 ID 等等。 Mybe,我必须在 setup.typoscript 中写点东西。但是不知道该写什么...

在 Myleaflet 的手册中:

Import the extension from TER (TYPO3 Extension Repository) like any other extension. Create some pages as shown below.

Pages for myleaflet On page ‘Ajax Map’ install plugin MyLeaflet (Map). Make sure you have installed jQuery on top of the page.

On page ‘myleaflet’ or on your root page insert ‘Typoscript Include static’ (from extension) MyLeaflet (myleaflet). With the constant editor insert the desired settings of the extension like storage Pid, your page ID’s, jQuery options, path to templates etc.

The data of tt_address and sys_categories is stored in page Data. Insert in the constant editor the correct “Default storage PID” of the tt_address records.

Then insert at least one sys_category in the page Data. Now insert some tt_address data records with latitude and longitude values and assign them to sys_categories. The extension did not fetch the coordinates by itself like the mymap extension.

To use your own mapIcons insert your mapIcons into the directory fileadmin/ext/myleaflet/Resources/Public/Icons. Insert in this directory your icons which then can be selected in your tt_address data records.

When everything is ok - test it…

使用常量编辑器插入所需的扩展设置,如存储 Pid、您的页面 ID、jQuery 选项、模板路径等。

  1. 我该怎么办? 我想我应该在 setup.ts 中写成“page = PAGE”,但我不知道我在那里写了什么。

tt_address和sys_categories的数据存放在页面Data中。在常量编辑器中插入 tt_address 记录的正确“默认存储 PID”。

  1. 我应该在constant.ts中写PID吗?:
persistence {
   # cat=plugin.tx_myleaflet//a; type=string; label=Default storage PID
   storagePid = 
 } 

我很抱歉我的愚蠢问题。 Typoscript 对我来说仍然很难...

感谢您的帮助。

添加:

我现在可以通过站点包在前端看到一个内容:

我在文本区域中输入了一些内容,然后按下了“suchen”按钮。但我没有任何工作。正常吗?还是我常量没配置好?

首先:不要编辑扩展的文件,看看站点包扩展的概念。更多:https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/

现在回答您的问题:

  1. 该扩展希望您编辑常量。常量是在 TypoScript 设置中使用的值。您可以在 TYPO3 后端的“模板”模块中找到常量编辑器(顶部的 select 框)。在那里你可以编辑你的常量,如果你完成了,你可以,例如将其剪切并粘贴到您的站点包常量文件中。

  2. 您也应该在这里使用常量编辑器。您的示例看起来像扩展文件(您不应更改)。

希望它能帮助你前进。