导入ADT的正确方法是什么

时间:2022-10-22 10:42:43

I have been following the steps outlined here: https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/importing-resources-with-your-themes

我一直在遵循此处列出的步骤:https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/importing-resources-with-your-themes

My custom structures and templates are being imported. The problem that I have is that I also want to define an ADT to be imported. Nothing happens when I create the directory structure outline here:https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/creating-plugins-to-share-structures-templates-and-more

我的自定义结构和模板正在导入。我遇到的问题是我还想定义要导入的ADT。我在这里创建目录结构大纲时没有任何反应:https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/creating-plugins-to-share-structures-templates-and-more

Is the "templates-importer" standard deprecated? Can the "resources-importer" and "templates-importer" not be used at the same time?

“模板导入器”标准是否已弃用?可以同时使用“资源导入器”和“模板导入器”吗?

I don't see any exceptions in the log and there's nothing to indicate why the ADT is not being imported. I have checked in the site template that is generated and in the global site.

我没有在日志中看到任何异常,也没有任何迹象表明为什么没有导入ADT。我已经检查了生成的站点模板和全局站点。

Suggestions? Do I really need to create a hook to import the ADT?

建议?我真的需要创建一个钩子来导入ADT吗?

1 个解决方案

#1


You can use only one of those two, but they share common code and functionality (here are if...else statements responsible for chosing one of). If you use Resources Importer already, you can add your ADT's to resources-importer folder (in the same way it is done within templates-importer) and it will be imported as well.

您只能使用这两个中的一个,但它们共享公共代码和功能(这里是if ... else语句,负责选择其中一个)。如果您已经使用了Resources Importer,则可以将ADT添加到resources-importer文件夹(与在templates-importer中完成的方式相同),也可以导入它。

I have a hook project which resources-importer which contains (among others) 4 ADTs. They are located in the following folders:

我有一个钩子项目,资源导入器包含(其中包括)4个ADT。它们位于以下文件夹中:

  • resources-importer/templates/application_display/asset_category
  • resources-importer/templates/application_display/asset_entry

First one is imported as ADT for Categories Navigation portlet and second for Asset Publisher portlet.

第一个导入为类别导航portlet的ADT,第二个导入为Asset Publisher portlet。

#1


You can use only one of those two, but they share common code and functionality (here are if...else statements responsible for chosing one of). If you use Resources Importer already, you can add your ADT's to resources-importer folder (in the same way it is done within templates-importer) and it will be imported as well.

您只能使用这两个中的一个,但它们共享公共代码和功能(这里是if ... else语句,负责选择其中一个)。如果您已经使用了Resources Importer,则可以将ADT添加到resources-importer文件夹(与在templates-importer中完成的方式相同),也可以导入它。

I have a hook project which resources-importer which contains (among others) 4 ADTs. They are located in the following folders:

我有一个钩子项目,资源导入器包含(其中包括)4个ADT。它们位于以下文件夹中:

  • resources-importer/templates/application_display/asset_category
  • resources-importer/templates/application_display/asset_entry

First one is imported as ADT for Categories Navigation portlet and second for Asset Publisher portlet.

第一个导入为类别导航portlet的ADT,第二个导入为Asset Publisher portlet。