简体   繁体   English

Joomla Virtuemart类别项目覆盖问题

[英]Joomla Virtuemart category item override issue

I am trying to override the layout for a VirtueMart homepage. 我试图覆盖VirtueMart主页的布局。 At present it displays a list of categories with the image and description. 目前,它显示带有图像和描述的类别列表。

The documentation to override each category items layout (not the entire category page layout) says to use default_showcategory.php in the productdetails folder. 覆盖每个类别项目布局(而不是整个类别页面布局)的文档说要在productdetails文件夹中使用default_showcategory.php

So I have copied the com_virtuemart/productdetails folder to the template html file and removed the temple folder to find the override file here templates/amandafield/html/com_virtuemart/productdetails/default_showcategory.php 因此,我已将com_virtuemart/productdetails文件夹复制到模板html文件,并删除了Temple文件夹以在此处找到替代文件templates/amandafield/html/com_virtuemart/productdetails/default_showcategory.php

However no changes in this file are affecting the layout. 但是,此文件中的任何更改都不会影响布局。 I have various other overrides following this file format and all working as should be. 我遵循此文件格式还有其他各种替代方法,所有这些替代方法都应能正常工作。

This indicates that this is not the correct file to override, however it is the only file that contains the same structure and classes as the category item. 这表明这不是要覆盖的正确文件,但是它是唯一包含与类别项目相同的结构和类的文件。

Could anyone advise what I am doing wrong? 谁能告诉我我在做什么错? (Joomla V3.5.1, VM V3.0.16) (Joomla V3.5.1,VM V3.0.16)

The ways in VirtueMart 3 to override categories are different form VM 2. VirtueMart 3中覆盖类别的方式与VM 2不同。

You can display categories and/or products in the category view and the virtuemart view (start page). 您可以在类别视图和conventmart视图(开始页面)中显示类别和/或产品。

The layout for the categories in the category view is in the sublayout called categories.php. 类别视图中类别的布局位于名为category.php的子布局中。 /components/com_virtuemart/sublayouts/ / components / com_virtuemart / sublayouts /

The layout for the products in category view in VirtueMart 3 is in a sublayout called products.php. VirtueMart 3中类别视图中产品的布局位于一个名为products.php的子布局中。 /components/com_virtuemart/sublayouts/ / components / com_virtuemart / sublayouts /

You can make overrides for the sublayouts in: /templates/YOURTEMPLATE/html/com_virtuemart/sublayouts/ 您可以在以下位置覆盖子布局:/ templates / YOURTEMPLATE / html / com_virtuemart / sublayouts /

If you set a menu item in Joomla for the category, you can choose the sublayout in the menu item properties. 如果您在Joomla中为类别设置菜单项,则可以在菜单项属性中选择子布局。

The homepage/front page is called by the view "virtuemart" until VM 3.0.16, but that is supposed to change in future and will also be called by the category view. 在VM 3.0.16之前,视图“ virtuemart”将调用主页/首页,但是该视图将来可能会更改,并且类别视图也会调用该页面。

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

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