came anyone explains this code
<div class="row"> <#list productCategoryList as childCategoryList> <#assign cateCount = 0/> <#list childCategoryList as productCategory> <div class="products-card col-md-3"> <#if (cateCount > 2)> <#assign cateCount = 0/> </#if> <#assign productCategoryId = productCategory.productCategoryId/> <#assign categoryImageUrl = "/images/defaultImage.jpg"/> <#assign productCategoryMembers = delegator .findByAnd("ProductCategoryAndMember", Static["org.apache.ofbiz.base.util.UtilMisc"] .toMap("productCategoryId", productCategoryId), Static["org.apache.ofbiz.base.util.UtilMisc"].toList("-quantity"), false)/> <#if productCategory.categoryImageUrl?has_content> <#assign categoryImageUrl = productCategory.categoryImageUrl/> <#elseif productCategoryMembers?has_content> <#assign productCategoryMember = Static["org.apache.ofbiz.entity.util.EntityUtil"].getFirst(productCategoryMembers)/> <#assign product = delegator.findOne("Product", Static["org.apache.ofbiz.base.util.UtilMisc"] .toMap("productId", productCategoryMember.productId), false)/> <#if product.smallImageUrl?has_content> <#assign categoryImageUrl = product.smallImageUrl/> </#if> </#if> <div class="card"> <a href="<@ofbizCatalogAltUrl productCategoryId=productCategoryId/>" class="text-center"> <img class="card-img-top" src="${categoryImageUrl}" alt="Card image cap"/> </a> <div class="card-body"> <h4 class="card-title"> <a style="font-size:12px" href="<@ofbizCatalogAltUrl productCategoryId=productCategoryId/>"> ${productCategory.categoryName!productCategoryId} </a> </h4> <p class="card-text"> <ul class=""> <#if productCategoryMembers??> <#assign i = 0/> <#list productCategoryMembers as productCategoryMember> <#if (i > 2)> <#if productCategoryMembers[i]?has_content> <li><a class="linktext" href="<@ofbizCatalogAltUrl productCategoryId=productCategoryId/>"> <span>More...</span> </a></li> </#if> <#break> </#if> <#if productCategoryMember?has_content> <#assign product = delegator.findOne("Product", Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("productId", productCategoryMember.productId), false)> <li> <a class="linktext" href="<@ofbizCatalogAltUrl productCategoryId="PROMOTIONS" productId="${product.productId}"/>"> ${product.productName!product.productId} </a> </li> </#if> <#assign i = i+1/> </#list> </#if> </ul> </p> </div> </div> <#assign cateCount = cateCount + 1/> </div> </#list> </div> </#list> |
Hi Shrilesh Korgaonkar,
Your email has been moderated, Please subscribe to the mailing list http://ofbiz.apache.org/mailing-lists.html Thanks & Regards -- Deepak Dixit On Mon, Aug 27, 2018 at 3:28 PM, Shrilesh Korgaonkar < [hidden email]> wrote: > came anyone explains this code > > <div class="row"> > > <#list productCategoryList as childCategoryList> > > <#assign cateCount = 0/> > > <#list childCategoryList as productCategory> > <div class="products-card col-md-3"> > <#if (cateCount > 2)> > <#assign cateCount = 0/> > </#if> > <#assign productCategoryId = productCategory. > productCategoryId/> > <#assign categoryImageUrl = "/images/defaultImage.jpg"/> > <#assign productCategoryMembers = delegator > .findByAnd("ProductCategoryAndMember", > Static["org.apache.ofbiz.base.util.UtilMisc"] > .toMap("productCategoryId", productCategoryId), > > Static["org.apache.ofbiz.base.util.UtilMisc"].toList("-quantity"), > false)/> > <#if productCategory.categoryImageUrl?has_content> > <#assign categoryImageUrl = productCategory. > categoryImageUrl/> > <#elseif productCategoryMembers?has_content> > <#assign productCategoryMember = > > Static["org.apache.ofbiz.entity.util.EntityUtil"].getFirst( > productCategoryMembers)/> > <#assign product = delegator.findOne("Product", > Static["org.apache.ofbiz.base.util.UtilMisc"] > .toMap("productId", > productCategoryMember.productId), false)/> > <#if product.smallImageUrl?has_content> > <#assign categoryImageUrl = product.smallImageUrl/> > </#if> > </#if> > > > > <div class="card"> > <a href="<@ofbizCatalogAltUrl > productCategoryId=productCategoryId/>" class="text-center"> > <img class="card-img-top" src="${categoryImageUrl}" > alt="Card image cap"/> > </a> > <div class="card-body"> > <h4 class="card-title"> > <a style="font-size:12px" href="<@ofbizCatalogAltUrl > productCategoryId=productCategoryId/>"> > ${productCategory.categoryName!productCategoryId} > </a> > </h4> > <p class="card-text"> > <ul class=""> > <#if productCategoryMembers??> > <#assign i = 0/> > <#list productCategoryMembers as > productCategoryMember> > <#if (i > 2)> > <#if productCategoryMembers[i]?has_content> > <li><a class="linktext" > href="<@ofbizCatalogAltUrl productCategoryId=productCategoryId/>"> > <span>More...</span> > </a></li> > </#if> > <#break> > </#if> > <#if productCategoryMember?has_content> > <#assign product = delegator.findOne("Product", > > Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("productId", > productCategoryMember.productId), > false)> > <li> > <a class="linktext" > href="<@ofbizCatalogAltUrl > productCategoryId="PROMOTIONS" > productId="${product.productId}"/>"> > ${product.productName!product.productId} > </a> > </li> > </#if> > <#assign i = i+1/> > </#list> > </#if> > </ul> > </p> > </div> > </div> > <#assign cateCount = cateCount + 1/> > </div> > </#list> > </div> > </#list> > |
Hi Shrilesh Korgaonkar,
What you wan to know about this code? This is freemarker template that generates HTML https://freemarker.apache.org/ Thanks & Regards -- Deepak Dixit On Mon, Aug 27, 2018 at 4:35 PM, Deepak Dixit <[hidden email]> wrote: > Hi Shrilesh Korgaonkar, > > Your email has been moderated, Please subscribe to the mailing list > http://ofbiz.apache.org/mailing-lists.html > > Thanks & Regards > -- > Deepak Dixit > > > On Mon, Aug 27, 2018 at 3:28 PM, Shrilesh Korgaonkar <shrilesh.korgaonkar@ > udyogmandir.in> wrote: > >> came anyone explains this code >> >> <div class="row"> >> >> <#list productCategoryList as childCategoryList> >> >> <#assign cateCount = 0/> >> >> <#list childCategoryList as productCategory> >> <div class="products-card col-md-3"> >> <#if (cateCount > 2)> >> <#assign cateCount = 0/> >> </#if> >> <#assign productCategoryId = productCategory.productCategor >> yId/> >> <#assign categoryImageUrl = "/images/defaultImage.jpg"/> >> <#assign productCategoryMembers = delegator >> .findByAnd("ProductCategoryAndMember", >> Static["org.apache.ofbiz.base.util.UtilMisc"] >> .toMap("productCategoryId", productCategoryId), >> >> Static["org.apache.ofbiz.base.util.UtilMisc"].toList("-quantity"), >> false)/> >> <#if productCategory.categoryImageUrl?has_content> >> <#assign categoryImageUrl = productCategory.categoryImageU >> rl/> >> <#elseif productCategoryMembers?has_content> >> <#assign productCategoryMember = >> >> Static["org.apache.ofbiz.entity.util.EntityUtil"].getFirst(p >> roductCategoryMembers)/> >> <#assign product = delegator.findOne("Product", >> Static["org.apache.ofbiz.base.util.UtilMisc"] >> .toMap("productId", >> productCategoryMember.productId), false)/> >> <#if product.smallImageUrl?has_content> >> <#assign categoryImageUrl = product.smallImageUrl/> >> </#if> >> </#if> >> >> >> >> <div class="card"> >> <a href="<@ofbizCatalogAltUrl >> productCategoryId=productCategoryId/>" class="text-center"> >> <img class="card-img-top" src="${categoryImageUrl}" >> alt="Card image cap"/> >> </a> >> <div class="card-body"> >> <h4 class="card-title"> >> <a style="font-size:12px" href="<@ofbizCatalogAltUrl >> productCategoryId=productCategoryId/>"> >> ${productCategory.categoryName!productCategoryId} >> </a> >> </h4> >> <p class="card-text"> >> <ul class=""> >> <#if productCategoryMembers??> >> <#assign i = 0/> >> <#list productCategoryMembers as >> productCategoryMember> >> <#if (i > 2)> >> <#if productCategoryMembers[i]?has_content> >> <li><a class="linktext" >> href="<@ofbizCatalogAltUrl productCategoryId=productCategoryId/>"> >> <span>More...</span> >> </a></li> >> </#if> >> <#break> >> </#if> >> <#if productCategoryMember?has_content> >> <#assign product = >> delegator.findOne("Product", >> >> Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("productId", >> productCategoryMember.productId), >> false)> >> <li> >> <a class="linktext" >> href="<@ofbizCatalogAltUrl >> productCategoryId="PROMOTIONS" >> productId="${product.productId}"/>"> >> ${product.productName!product.productId} >> </a> >> </li> >> </#if> >> <#assign i = i+1/> >> </#list> >> </#if> >> </ul> >> </p> >> </div> >> </div> >> <#assign cateCount = cateCount + 1/> >> </div> >> </#list> >> </div> >> </#list> >> > > |
Free forum by Nabble | Edit this page |