简体   繁体   English

如何在Intershop7中覆盖渲染ISML模板

[英]How to override a render ISML template in Intershop7

In Enfinity Suite 6.4 we used to customize storefront pages by overriding ISML templates of the PrimeTech cartridges. 在Enfinity Suite 6.4中,我们通过覆盖PrimeTech墨盒的ISML模板来自定义店面页面。 For example, it was possible to add a dependency in our custom cartridge to "sld_ch_consumer_app" and replace any Primetech ISML template by adding the template with the same name and hierarchy in our custom cartridge. 例如,可以在自定义盒式磁带中向“ sld_ch_consumer_app”添加依赖项,并通过在自定义盒式磁带中添加具有相同名称和层次的模板来替换任何Primetech ISML模板。

Is something like that possible in Intershop7? 在Intershop7中有可能发生这种情况吗? For example, we would like to change the order of the ISML elements in ProductTile.isml, without overriding the pagelet model. 例如,我们希望在ProductTile.isml中更改ISML元素的顺序,而不必覆盖pagelet模型。 If we add a dependency in our custom cartridge to "app_sf_responsive_cm" and create the ISML template with the same name and folder hierarchy in our custom cartridge, the system still loads the ISML template from the "app_sf_responsive_cm". 如果我们在自定义盒式磁带中将依赖项添加到“ app_sf_sensitive_cm”,并在自定义盒式磁带中创建具有相同名称和文件夹层次结构的ISML模板,系统仍将从“ app_sf_sensitive_cm”中加载ISML模板。

Only way we managed to achieve to see the changes in storefront was by overriding the pagelet model and changing the render template name to "ProductTileCustom". 我们设法实现看到店面中的更改的唯一方法是,重写页面let模型并将渲染模板名称更改为“ ProductTileCustom”。 Like this: 像这样:

在此处输入图片说明

If we don't use the custom name for the render template, system will first load the ProductTile.isml from the app_sf_responsive_cm instead of the one n our custom cartridge (app_sf_a1_shop_cm). 如果我们不使用自定义名称作为渲染模板,则系统将首先从app_sf_sensitive_cm中加载ProductTile.isml,而不是从我们的自定义墨盒(app_sf_a1_shop_cm)中加载ProductTile.isml。

The order of the cartridges in the cartridgelist.properties is this: 卡式盒列表.properties中的卡式盒顺序为:

....
bc_urlrewrite_test \
bc_product_rating_orm_test \
commerce_management_b2c_component \
app_core_a1 \
app_sf_a1_shop \
app_sf_a1_shop_cm \
app_bo_a1 \
app_sf_responsive \
app_sf_responsive_cm \
app_sf_responsive_b2c \
app_sf_responsive_smb \
as_responsive \
as_a1 \

Is there some easier way of overriding the responsive store ISML templates other than overriding the pagelet model? 除了覆盖小页面模型之外,还有其他更简单的方法来覆盖响应式存储ISML模板吗?

There should be no need to override the pagelet model, just overriding the ISML template should do the trick. 不需要覆盖pagelet模型,只需覆盖ISML模板即可解决问题。 You can easily override ISML templates in Intershop 7 by doing the following: 您可以通过执行以下操作在Intershop 7中轻松覆盖ISML模板:

  1. Right click the custom cartridge to which you want to add the new template and select new > ISML Template . 右键单击要向其添加新模板的自定义盒带,然后选择new > ISML Template
  2. In the popup window that appears click Override Existing... . 在出现的弹出窗口中,单击“ Override Existing...
  3. Select the template you want to override and click open . 选择要覆盖的模板,然后单击“ open
  4. Click Finish . 点击Finish

Intershop Studio will now automatically create the template and correct folder structure inside your specified cartridge. Intershop Studio现在将自动在您指定的墨盒中创建模板并纠正文件夹结构。

Depending on your settings in the appserver.properties file you might need to restart or even re-deploy the application server before the new template will show up in the frontend. 根据appserver.properties文件中的设置,您可能需要重新启动甚至重新部署应用程序服务器,然后新模板才能在前端显示。

In addition to what Bas de Groot was mentioning in regards to use the intershop studio wizard to override an ISML template, I want to point out that your problem lies within the wrong order of cartridges in your cartridgelist.properties. 除了Bas de Groot在使用intershop studio向导覆盖ISML模板方面提到的内容之外,我还想指出您的问题还在于您的carterlist.properties中的盒带顺序错误。 So instead of: 所以代替:

bc_urlrewrite_test \\ bc_product_rating_orm_test \\ commerce_management_b2c_component \\ app_core_a1 \\ app_sf_a1_shop \\ app_sf_a1_shop_cm \\ app_bo_a1 \\ app_sf_responsive \\ app_sf_responsive_cm \\ app_sf_responsive_b2c \\ app_sf_responsive_smb \\ as_responsive \\ as_a1 \\

You must use this order here: 您必须在此使用此命令:

bc_urlrewrite_test \\ bc_product_rating_orm_test \\ commerce_management_b2c_component \\ app_sf_responsive \\ app_sf_responsive_cm \\ app_sf_responsive_b2c \\ app_sf_responsive_smb \\ as_responsive \\ as_a1 \\ app_core_a1 \\ app_sf_a1_shop \\ app_sf_a1_shop_cm \\ app_bo_a1 \\

In other words, your project cartridges must be loaded after the intershop stuff 换句话说,您的专案子弹必须在Intershop装满之后装入

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

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