我正在建立一个基于 Broadleaf 模板的电子商务网站。我想从网站右侧删除精选列??
3 回答
我<section id="right_column">
在 product.html 中找到了一个标签。如果我删除此标签,则右侧面板将从站点中删除。还有其他更好的解决方案吗?
如果您使用的是位于:https ://github.com/BroadleafCommerce/DemoSite 的演示站点, 您确实可以删除此部分:
/site/src/main/webapp/WEB-INF/templates/catalog/product.html
从<section id="right_column">
<header>Featured Products</header>
<div id="options">
<div class="section">
<blc:related_products productId="${product.id}"/>
<ul id="featured_products" class="group">
<li th:each="relatedProduct : ${relatedProducts}" th:object="${relatedProduct.relatedProduct}" th:include="catalog/partials/productListItem" class="product_container"></li>
</ul>
</div>
</div>
但可能通过搜索blc:related_products
源代码来完全删除特色产品,您会在 4 个文件中找到它:site/src/main/webapp/WEB-INF/templates/content/default.html
、、、、site/src/main/webapp/WEB-INF/templates/catalog/product.html
site/src/main/webapp/WEB-INF/templates/catalog/category.html
site/src/main/webapp/WEB-INF/templates/catalog/search.html
但请记住,此处理器仅消除了针对不同上下文查找特色产品的调用,例如链接到类别或产品的特色产品等。
- CSS #right_column {display:none} 或在模板中搜索 id 为 right_column 的 div