Author: ashish
Date: Thu Sep 24 12:14:33 2009 New Revision: 818457 URL: http://svn.apache.org/viewvc?rev=818457&view=rev Log: Applied patch from jira issue - OFBIZ-2966 - User Friendly Urls on Breadcrumbs of ecommerce/order manager. Thanks Chirag and Rishi for the contribution. Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl?rev=818457&r1=818456&r2=818457&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl Thu Sep 24 12:14:33 2009 @@ -23,27 +23,23 @@ <#-- looping macro --> <#macro categoryList parentCategory category> <#if parentCategory.productCategoryId != category.productCategoryId> - <#local pStr = "/~pcategory=" + parentCategory.productCategoryId> + <#assign categoryUrl = Static["org.ofbiz.product.category.CatalogUrlServlet"].makeCatalogUrl(request, "", category.productCategoryId, parentCategory.productCategoryId) /> + <#else> + <#assign categoryUrl = Static["org.ofbiz.product.category.CatalogUrlServlet"].makeCatalogUrl(request, "", category.productCategoryId, "") /> </#if> <#if (Static["org.ofbiz.product.category.CategoryWorker"].checkTrailItem(request, category.getString("productCategoryId"))) || (curCategoryId?exists && curCategoryId == category.productCategoryId)> <li> - <#if curCategoryId?exists && curCategoryId == category.productCategoryId> - <#if catContentWrappers?exists && catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")?exists> - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="buttontextdisabled">${catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")}</a> - <#elseif catContentWrappers?exists && catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists> - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="buttontextdisabled">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")}</a> + <#if catContentWrappers?exists && catContentWrappers[category.productCategoryId]?exists> + <a href="${categoryUrl}" class="<#if curCategoryId?exists && curCategoryId == category.productCategoryId>buttontextdisabled<#else>linktext</#if>"> + <#if catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")?exists> + ${catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")} + <#elseif catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists> + ${catContentWrappers[category.productCategoryId].get("DESCRIPTION")} <#else> - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="buttontextdisabled">${category.description?if_exists}</a> - </#if> - <#else> - <#if catContentWrappers?exists && catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")?exists> - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="linktext">${catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")}</a> - <#elseif catContentWrappers?exists && catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists> - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="linktext">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")}</a> - <#else> - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="linktext">${category.description?if_exists}</a> + ${category.description?if_exists} </#if> + </a> </#if> </li> <#local subCatList = Static["org.ofbiz.product.category.CategoryWorker"].getRelatedCategoriesRet(request, "subCatList", category.getString("productCategoryId"), true)> |
Free forum by Nabble | Edit this page |