【问题标题】:How to hide the Featured Column from Broadleaf Site如何隐藏 Broadleaf 网站的特色栏目
【发布时间】:2014-09-27 21:15:48
【问题描述】:

我正在建立一个基于Broadleaf模板的电子商务网站。我想从网站右侧删除Featured栏??

【问题讨论】:

  • 你用的是哪个版本?

标签: html e-commerce thymeleaf broadleaf-commerce


【解决方案1】:

如果您使用的演示站点位于: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.htmlsite/src/main/webapp/WEB-INF/templates/catalog/product.htmlsite/src/main/webapp/WEB-INF/templates/catalog/category.htmlsite/src/main/webapp/WEB-INF/templates/catalog/search.html

但请记住,此处理器仅消除了针对不同上下文查找特色产品的调用,例如链接到类别或产品的特色产品等。

【讨论】:

    【解决方案2】:

    我在 product.html 中发现了一个 &lt;section id="right_column"&gt; 标记。如果我删除此标记,则右侧面板将从站点中删除。还有其他更好的解决方案吗??

    【讨论】:

      【解决方案3】:
      1. CSS #right_column {display:none} 或在模板中搜索 id 为 right_column 的 div

      【讨论】:

      • 根据我的要求,我需要从系统中完全删除右侧面板。您的 ans 只会隐藏它,不会删除它。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-11
      相关资源
      最近更新 更多