5 Replies Latest reply on Jun 20, 2013 9:57 AM by PuzanovsP

    Relative stop level not applied to breadcrumb

    irondome

      We didn't want users to go navigate back to the previous level of the site sequence from the breadcrumb. So we created a new template with a breadcrumb (different path name), and set the relative stop level to only show 2 level above of the current level. It looked fine in the author env but when I published it, it still showed the full path. Please help?

        • 1. Re: Relative stop level not applied to breadcrumb
          PuzanovsP Level 4

          More templates always mean higher complexity. Have you concidered adding page level property hide in breadcrumb for pages you don't want to show in breadcrumb ?

           

          Did you activated the page in the Author ?

          Try opening the crx/de in your publisher and check whether the expected content appears to be present in the publisher.

          1 person found this helpful
          • 2. Re: Relative stop level not applied to breadcrumb
            irondome Level 1

            Thank you very much!

            Yes I have activated the page in the Author. It is working for me in my local and staging environment but not QA env. Very strange.

            The reason I created another template because I only want a few pages displayed breadcrumb on previous relative level.

            How can I add page level property hide in breadcrumb?

            Thanks again for your help!

            • 3. Re: Relative stop level not applied to breadcrumb
              PuzanovsP Level 4

              In your template create a file called dialog.xml with the following content:

               

              <?xml version="1.0" encoding="UTF-8"?>

              <jcr:root xmlns:crx="http://www.day.com/crx/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:rep="internal"

                  jcr:primaryType="cq:Dialog"

                  height="400"

                  stateful="false"

                  xtype="dialog">

                  <items jcr:primaryType="cq:WidgetCollection">

                      <tabs jcr:primaryType="cq:TabPanel">

                          <items jcr:primaryType="cq:WidgetCollection">

                              <inheritedTabs

                                  jcr:primaryType="cq:Widget"

                                  path="/libs/foundation/components/page/dialog/items/tabs/items.infinity.json"

                                  xtype="cqinclude"/>

                              <navigation-tab-fields

                                  jcr:mixinTypes="[rep:AccessControllable]"

                                  jcr:primaryType="cq:Panel"

                                  autoScroll="{Boolean}true"

                                  title="Navigation">

                                  <items jcr:primaryType="cq:WidgetCollection">

                                      <nav

                                          jcr:primaryType="cq:Widget"

                                          xtype="dialogfieldset">

                                          <items jcr:primaryType="cq:WidgetCollection">

                                              <excludeInBreadcrumb

                                                  jcr:primaryType="cq:Widget"

                                                  defaultValue="false"

                                                  fieldDescription="Exclude the page in breadcrumb."

                                                  fieldLabel="Exclude the page in breadcrumb"

                                                  name="./excludeInBreadcrumb"

                                                  type="checkbox"

                                                  xtype="selection"/>

                                           

                                              <breadcrumbGenerationStopLevel

                                                  jcr:primaryType="cq:Widget"

                                                  fieldDescription="Stop generating breadcrumb at this custom level."

                                                  fieldLabel="Breadcrumb generation stop level"

                                                  name="./breadcrumbGenerationStopLevel"

                                                  xtype="textfield"/>

                                          </items>

                                      </nav>

                                  </items>

                              </navigation-tab-fields>

                          </items>

                      </tabs>

                  </items>

              </jcr:root>

               

              Now, in your page e.g. breadcrumb.jsp

              add following lines:

              .... //some code before

              int stopGeneratingBreadcrumbAtLevel = Integer.parseInt(actualPage.getProperties().get("breadcrumbGenerationStopLevel", "2"));

              while (actualPage.getDepth() > stopGeneratingBreadcrumbAtLevel) {

                              if (actualPage.getProperties().get("excludeInBreadcrumb", "false").equals("false")) { // exclude(ignore from breadcrumb) when the value is true

                                  breadcrumbPages.add(actualPage); //add to the list

                              }

                              actualPage = actualPage.getParent();//go one level higher

                          }

              .... //some code after

               

              Now, on pages that you want to exclude from the breadcrumb simply click in page properties the checkbox exclude from breadcrumb.

               

              Check the QA env replication state may be there will be a queue of non replicated items ?

              1 person found this helpful
              • 4. Re: Relative stop level not applied to breadcrumb
                irondome Level 1

                Thank you so much! I will try it out.

                How can I check QA env replication state to see if there is a queue of non replicated items?