Changed breadcrumbs.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Changed breadcrumbs.ftl

Kiran-2
Hello Friends,

I have updated breadcrumbs.ftl as below. It avoids recursion of each
category. Hence efficient.

  <ul class="breadcrumbs">
    <li>
      <a href="<@ofbizUrl>main</@ofbizUrl>" class="linktext">
${uiLabelMap.CommonMain}</a> &gt;
    </li>
    <#-- Show the category branch -->
    <#assign crumbs = Static["org.ofbiz.product.category.CategoryWorker"
].getTrail(request)/>
    <#list crumbs as crumb>
            <#if (catContentWrappers[crumb]?exists)>
                <li><#if crumb_has_next>
                              <a href="<@ofbizCatalogUrl
currentCategoryId=crumb previousCategoryId=previousCategoryId!""/>">
                                  ${catContentWrappers[crumb].get(
"CATEGORY_NAME")}
                              </a> &gt;
                        <#else>
                                <strong>
                                          ${catContentWrappers[crumb].get(
"CATEGORY_NAME")}
                                </strong>
                        </#if>
                </li>
                <#assign previousCategoryId = crumb />
        </#if>
    </#list>
    <#-- Show the product, if there is one -->
    <#if productContentWrapper?exists>
    <li>${productContentWrapper.get("PRODUCT_NAME")?if_exists}</li>
    </#if>
  </ul>


Regards,
Kiran Gawde

Senior Software Architect
Object Edge Inc
(925) 943 5558 x108

"Never give up on what you really want to do. The person with big dreams
is more powerful than one with all the facts" - Unknown
Reply | Threaded
Open this post in threaded view
|

Re: Changed breadcrumbs.ftl

Bilgin Ibryam-2
Hi Kiran,

Can you create a jira issue, describe what problem it is fixing and
upload the patch there?

Bilgin

On Wed, Sep 7, 2011 at 11:04 PM,  <[hidden email]> wrote:

> Hello Friends,
>
> I have updated breadcrumbs.ftl as below. It avoids recursion of each
> category. Hence efficient.
>
>  <ul class="breadcrumbs">
>    <li>
>      <a href="<@ofbizUrl>main</@ofbizUrl>" class="linktext">
> ${uiLabelMap.CommonMain}</a> &gt;
>    </li>
>    <#-- Show the category branch -->
>    <#assign crumbs = Static["org.ofbiz.product.category.CategoryWorker"
> ].getTrail(request)/>
>    <#list crumbs as crumb>
>            <#if (catContentWrappers[crumb]?exists)>
>                <li><#if crumb_has_next>
>                              <a href="<@ofbizCatalogUrl
> currentCategoryId=crumb previousCategoryId=previousCategoryId!""/>">
>                                  ${catContentWrappers[crumb].get(
> "CATEGORY_NAME")}
>                              </a> &gt;
>                        <#else>
>                                <strong>
>                                          ${catContentWrappers[crumb].get(
> "CATEGORY_NAME")}
>                                </strong>
>                        </#if>
>                </li>
>                <#assign previousCategoryId = crumb />
>        </#if>
>    </#list>
>    <#-- Show the product, if there is one -->
>    <#if productContentWrapper?exists>
>    <li>${productContentWrapper.get("PRODUCT_NAME")?if_exists}</li>
>    </#if>
>  </ul>
>
>
> Regards,
> Kiran Gawde
>
> Senior Software Architect
> Object Edge Inc
> (925) 943 5558 x108
>
> "Never give up on what you really want to do. The person with big dreams
> is more powerful than one with all the facts" - Unknown
Reply | Threaded
Open this post in threaded view
|

Re: Changed breadcrumbs.ftl

Jacques Le Roux
Administrator
This may help

https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices

Jacques

From: "Bilgin Ibryam" <[hidden email]>

> Hi Kiran,
>
> Can you create a jira issue, describe what problem it is fixing and
> upload the patch there?
>
> Bilgin
>
> On Wed, Sep 7, 2011 at 11:04 PM,  <[hidden email]> wrote:
>> Hello Friends,
>>
>> I have updated breadcrumbs.ftl as below. It avoids recursion of each
>> category. Hence efficient.
>>
>> <ul class="breadcrumbs">
>> <li>
>> <a href="<@ofbizUrl>main</@ofbizUrl>" class="linktext">
>> ${uiLabelMap.CommonMain}</a> &gt;
>> </li>
>> <#-- Show the category branch -->
>> <#assign crumbs = Static["org.ofbiz.product.category.CategoryWorker"
>> ].getTrail(request)/>
>> <#list crumbs as crumb>
>> <#if (catContentWrappers[crumb]?exists)>
>> <li><#if crumb_has_next>
>> <a href="<@ofbizCatalogUrl
>> currentCategoryId=crumb previousCategoryId=previousCategoryId!""/>">
>> ${catContentWrappers[crumb].get(
>> "CATEGORY_NAME")}
>> </a> &gt;
>> <#else>
>> <strong>
>> ${catContentWrappers[crumb].get(
>> "CATEGORY_NAME")}
>> </strong>
>> </#if>
>> </li>
>> <#assign previousCategoryId = crumb />
>> </#if>
>> </#list>
>> <#-- Show the product, if there is one -->
>> <#if productContentWrapper?exists>
>> <li>${productContentWrapper.get("PRODUCT_NAME")?if_exists}</li>
>> </#if>
>> </ul>
>>
>>
>> Regards,
>> Kiran Gawde
>>
>> Senior Software Architect
>> Object Edge Inc
>> (925) 943 5558 x108
>>
>> "Never give up on what you really want to do. The person with big dreams
>> is more powerful than one with all the facts" - Unknown
>
Reply | Threaded
Open this post in threaded view
|

Re: Changed breadcrumbs.ftl

Kiran-2
Thanks for the link. I have created a Jira issue by following the
directions: OFBIZ-4410

Also, uploaded the patch. Since, we have our own SVN repo (had checked in
the code that was downloaded few months back), you may not be able to
import patch directly. But at least, it will help you identify the change.

From instructions below, I couldn't understand if I need to checkout from
ofbiz SVN using anonymous and then create patch.
"If your local sandbox is checked out from a separate SVN repository
following the vendor branch pattern instead of directly from the OFBiz
SVN, then you should do a vendor branch update, merge, and then local
update in your sandbox before doing the svn diff to create the patch."

I have few other changes to commit. Once you confirm whatever I did is ok,
I will create issues/patches for others. Thanks for your help.

Regards,
Kiran Gawde

Senior Software Architect
Object Edge Inc
(925) 943 5558 x108

"Never give up on what you really want to do. The person with big dreams
is more powerful than one with all the facts" - Unknown



From:   "Jacques Le Roux" <[hidden email]>
To:     <[hidden email]>
Date:   09/08/2011 04:32 AM
Subject:        Re: Changed breadcrumbs.ftl



This may help

https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices


Jacques

From: "Bilgin Ibryam" <[hidden email]>

> Hi Kiran,
>
> Can you create a jira issue, describe what problem it is fixing and
> upload the patch there?
>
> Bilgin
>
> On Wed, Sep 7, 2011 at 11:04 PM,  <[hidden email]> wrote:
>> Hello Friends,
>>
>> I have updated breadcrumbs.ftl as below. It avoids recursion of each
>> category. Hence efficient.
>>
>> <ul class="breadcrumbs">
>> <li>
>> <a href="<@ofbizUrl>main</@ofbizUrl>" class="linktext">
>> ${uiLabelMap.CommonMain}</a> &gt;
>> </li>
>> <#-- Show the category branch -->
>> <#assign crumbs = Static["org.ofbiz.product.category.CategoryWorker"
>> ].getTrail(request)/>
>> <#list crumbs as crumb>
>> <#if (catContentWrappers[crumb]?exists)>
>> <li><#if crumb_has_next>
>> <a href="<@ofbizCatalogUrl
>> currentCategoryId=crumb previousCategoryId=previousCategoryId!""/>">
>> ${catContentWrappers[crumb].get(
>> "CATEGORY_NAME")}
>> </a> &gt;
>> <#else>
>> <strong>
>> ${catContentWrappers[crumb].get(
>> "CATEGORY_NAME")}
>> </strong>
>> </#if>
>> </li>
>> <#assign previousCategoryId = crumb />
>> </#if>
>> </#list>
>> <#-- Show the product, if there is one -->
>> <#if productContentWrapper?exists>
>> <li>${productContentWrapper.get("PRODUCT_NAME")?if_exists}</li>
>> </#if>
>> </ul>
>>
>>
>> Regards,
>> Kiran Gawde
>>
>> Senior Software Architect
>> Object Edge Inc
>> (925) 943 5558 x108
>>
>> "Never give up on what you really want to do. The person with big
dreams
>> is more powerful than one with all the facts" - Unknown
>

Reply | Threaded
Open this post in threaded view
|

Re: Changed breadcrumbs.ftl

Jacques Le Roux
Administrator
Thanks, I will have a look when I will get a chance...

Jacques

From: <[hidden email]>

> Thanks for the link. I have created a Jira issue by following the
> directions: OFBIZ-4410
>
> Also, uploaded the patch. Since, we have our own SVN repo (had checked in
> the code that was downloaded few months back), you may not be able to
> import patch directly. But at least, it will help you identify the change.
>
> From instructions below, I couldn't understand if I need to checkout from
> ofbiz SVN using anonymous and then create patch.
> "If your local sandbox is checked out from a separate SVN repository
> following the vendor branch pattern instead of directly from the OFBiz
> SVN, then you should do a vendor branch update, merge, and then local
> update in your sandbox before doing the svn diff to create the patch."
>
> I have few other changes to commit. Once you confirm whatever I did is ok,
> I will create issues/patches for others. Thanks for your help.
>
> Regards,
> Kiran Gawde
>
> Senior Software Architect
> Object Edge Inc
> (925) 943 5558 x108
>
> "Never give up on what you really want to do. The person with big dreams
> is more powerful than one with all the facts" - Unknown
>
>
>
> From:   "Jacques Le Roux" <[hidden email]>
> To:     <[hidden email]>
> Date:   09/08/2011 04:32 AM
> Subject:        Re: Changed breadcrumbs.ftl
>
>
>
> This may help
>
> https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
>
>
> Jacques
>
> From: "Bilgin Ibryam" <[hidden email]>
>> Hi Kiran,
>>
>> Can you create a jira issue, describe what problem it is fixing and
>> upload the patch there?
>>
>> Bilgin
>>
>> On Wed, Sep 7, 2011 at 11:04 PM,  <[hidden email]> wrote:
>>> Hello Friends,
>>>
>>> I have updated breadcrumbs.ftl as below. It avoids recursion of each
>>> category. Hence efficient.
>>>
>>> <ul class="breadcrumbs">
>>> <li>
>>> <a href="<@ofbizUrl>main</@ofbizUrl>" class="linktext">
>>> ${uiLabelMap.CommonMain}</a> &gt;
>>> </li>
>>> <#-- Show the category branch -->
>>> <#assign crumbs = Static["org.ofbiz.product.category.CategoryWorker"
>>> ].getTrail(request)/>
>>> <#list crumbs as crumb>
>>> <#if (catContentWrappers[crumb]?exists)>
>>> <li><#if crumb_has_next>
>>> <a href="<@ofbizCatalogUrl
>>> currentCategoryId=crumb previousCategoryId=previousCategoryId!""/>">
>>> ${catContentWrappers[crumb].get(
>>> "CATEGORY_NAME")}
>>> </a> &gt;
>>> <#else>
>>> <strong>
>>> ${catContentWrappers[crumb].get(
>>> "CATEGORY_NAME")}
>>> </strong>
>>> </#if>
>>> </li>
>>> <#assign previousCategoryId = crumb />
>>> </#if>
>>> </#list>
>>> <#-- Show the product, if there is one -->
>>> <#if productContentWrapper?exists>
>>> <li>${productContentWrapper.get("PRODUCT_NAME")?if_exists}</li>
>>> </#if>
>>> </ul>
>>>
>>>
>>> Regards,
>>> Kiran Gawde
>>>
>>> Senior Software Architect
>>> Object Edge Inc
>>> (925) 943 5558 x108
>>>
>>> "Never give up on what you really want to do. The person with big
> dreams
>>> is more powerful than one with all the facts" - Unknown
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Changed breadcrumbs.ftl

BJ Freeman
How about linking it to the service Engine page and the FAQ?

Jacques Le Roux sent the following on 9/13/2011 10:57 PM:

> Thanks, I will have a look when I will get a chance...
>
> Jacques
>
> From: <[hidden email]>
>> Thanks for the link. I have created a Jira issue by following the
>> directions: OFBIZ-4410
>> Also, uploaded the patch. Since, we have our own SVN repo (had checked
>> in the code that was downloaded few months back), you may not be able
>> to import patch directly. But at least, it will help you identify the
>> change.
>>
>> From instructions below, I couldn't understand if I need to checkout
>> from ofbiz SVN using anonymous and then create patch.
>> "If your local sandbox is checked out from a separate SVN repository
>> following the vendor branch pattern instead of directly from the OFBiz
>> SVN, then you should do a vendor branch update, merge, and then local
>> update in your sandbox before doing the svn diff to create the patch."
>>
>> I have few other changes to commit. Once you confirm whatever I did is
>> ok, I will create issues/patches for others. Thanks for your help.
>>
>> Regards,
>> Kiran Gawde
>>
>> Senior Software Architect
>> Object Edge Inc
>> (925) 943 5558 x108
>>
>> "Never give up on what you really want to do. The person with big
>> dreams is more powerful than one with all the facts" - Unknown
>>
>>
>>
>> From:   "Jacques Le Roux" <[hidden email]>
>> To:     <[hidden email]>
>> Date:   09/08/2011 04:32 AM
>> Subject:        Re: Changed breadcrumbs.ftl
>>
>>
>>
>> This may help
>>
>> https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
>>
>>
>>
>> Jacques
>>
>> From: "Bilgin Ibryam" <[hidden email]>
>>> Hi Kiran,
>>>
>>> Can you create a jira issue, describe what problem it is fixing and
>>> upload the patch there?
>>>
>>> Bilgin
>>>
>>> On Wed, Sep 7, 2011 at 11:04 PM,  <[hidden email]> wrote:
>>>> Hello Friends,
>>>>
>>>> I have updated breadcrumbs.ftl as below. It avoids recursion of each
>>>> category. Hence efficient.
>>>>
>>>> <ul class="breadcrumbs">
>>>> <li>
>>>> <a href="<@ofbizUrl>main</@ofbizUrl>" class="linktext">
>>>> ${uiLabelMap.CommonMain}</a> &gt;
>>>> </li>
>>>> <#-- Show the category branch -->
>>>> <#assign crumbs = Static["org.ofbiz.product.category.CategoryWorker"
>>>> ].getTrail(request)/>
>>>> <#list crumbs as crumb>
>>>> <#if (catContentWrappers[crumb]?exists)>
>>>> <li><#if crumb_has_next>
>>>> <a href="<@ofbizCatalogUrl
>>>> currentCategoryId=crumb previousCategoryId=previousCategoryId!""/>">
>>>> ${catContentWrappers[crumb].get(
>>>> "CATEGORY_NAME")}
>>>> </a> &gt;
>>>> <#else>
>>>> <strong>
>>>> ${catContentWrappers[crumb].get(
>>>> "CATEGORY_NAME")}
>>>> </strong>
>>>> </#if>
>>>> </li>
>>>> <#assign previousCategoryId = crumb />
>>>> </#if>
>>>> </#list>
>>>> <#-- Show the product, if there is one -->
>>>> <#if productContentWrapper?exists>
>>>> <li>${productContentWrapper.get("PRODUCT_NAME")?if_exists}</li>
>>>> </#if>
>>>> </ul>
>>>>
>>>>
>>>> Regards,
>>>> Kiran Gawde
>>>>
>>>> Senior Software Architect
>>>> Object Edge Inc
>>>> (925) 943 5558 x108
>>>>
>>>> "Never give up on what you really want to do. The person with big
>> dreams
>>>> is more powerful than one with all the facts" - Unknown
>>>
>>
>>
>
>