Breadcrumb in AEM 6
<p>I have a requirement to create breadcrumb in sightly. I have following code which is working fine in JSP. But i am struggling to convert the code to sightly because i am not getting the right methods in currentStyle object to get the "absParent" and others. Any help will be highly appreciated!! </p>

<pre><code>        &lt;%@ include file="/libs/foundation/global.jsp" %&gt;
        &lt;%

            final int startLevel = currentStyle.get("absParent", 3);
            final int endLevel = currentPage.getDepth() - currentStyle.get("relParent", 0);
            final int minItems = currentStyle.get("minItems", 2);
            if (startLevel &lt;= endLevel - minItems) {
             %&gt;&lt;section class="breadcrumbs"&gt;&lt;%
                for (int level = startLevel+1; level &lt; endLevel; ++level) {
                    Page itemPage = currentPage.getAbsoluteParent(level);
                    if (itemPage == null || !itemPage.isValid() || itemPage.isHideInNav()) {
                        continue;
                    }

                    final String pagePath = itemPage.getPath() + ".html";   
                    final String pageTitle = itemPage.getNavigationTitle();

                    String className = "breadcrumb-item-"+level;
                    if (level == startLevel) className += " breadcrumb-first";
                    if (level == endLevel-1) className += " breadcrumb-last";

                    pageContext.setAttribute("className", className);%&gt;
                &lt;section class="breadcrumbs "&gt;
                        &lt;a href="&lt;%= xssAPI.getValidHref(pagePath) %&gt;" class="breadcrumb-item"&gt;&lt;%= xssAPI.encodeForHTML(pageTitle) %&gt;&lt;/a&gt;
                &lt;/section&gt;    

                &lt;%} %&gt;
            &lt;/section&gt;&lt;%
            }

        %&gt;
</code></pre>