Search code examples
htmle-commercethymeleafbroadleaf-commerce

How to hide the Featured Column from Broadleaf Site


I m building a E-commerce website based on Broadleaf template.I want to remove the Featured column from the right side of the website ??


Solution

  • If you are using demo site which is located at : https://github.com/BroadleafCommerce/DemoSite you could indeed remove this section :

    /site/src/main/webapp/WEB-INF/templates/catalog/product.html

    from <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>

    but probably a complete removal of featured product will be achieved by searching for blc:related_products into source code and you'll find it into 4 files : 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

    but remember this processor only removes the call for finding featured products for different contexts, like featured products linked to a category or to a product, etc.