Developer forum

Forum » Ecommerce - Standard features » Breadcrumb and product

Breadcrumb and product

Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi,

I'm not very experienced with the xslt-files, used in navigation and breadcrumbs, so please forgive my basic question.

Is it possible to make the breadcrumbs include the current product in Ecom? Right now it only shows the directory-path to the product, but not the product itself:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
 <!--
  Description: ul/li based navigation. No features from admin implemented.
  Recommended settings:
  Fold out: True or False
  Upper menu: Dynamic or Static
  First level: > 0
  Last level: >= First level
  -->

 <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"  encoding="utf-8" />
 <xsl:param name="html-content-type" />
 <xsl:template match="/NavigationTree">
 <xsl:if test="count(//Page) &gt;= 0">
      <ul itemscope="" itemtype="http://schema.org/BreadcrumbList">
     
 <xsl:if test="Settings/LayoutNavigationAttributes/@class!=''">
 <xsl:attribute name="class">
 <xsl:value-of select="Settings/LayoutNavigationAttributes/@class" disable-output-escaping="yes"/>
 </xsl:attribute>
 </xsl:if>

 <xsl:if test="Settings/LayoutNavigationAttributes/@id!=''">
 <xsl:attribute name="id">
 <xsl:value-of select="Settings/LayoutNavigationAttributes/@id" disable-output-escaping="yes"/>
 </xsl:attribute>
 </xsl:if>

 <xsl:apply-templates select="//Page[@InPath='True']">       

 <xsl:with-param name="depth" select="1"/>
 </xsl:apply-templates>
 </ul>
 </xsl:if>
 </xsl:template>

 <xsl:template match="//Page[@InPath='True']">
 <xsl:param name="depth"/>
 <li class="breadcrumb__item" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
  <a class="breadcrumb__link" itemscope="" itemtype="http://schema.org/WebPage" itemprop="item">
 <xsl:attribute name="href">
 <xsl:value-of select="@FriendlyHref" disable-output-escaping="yes"/>
 </xsl:attribute>
 <xsl:attribute name="id">
 <xsl:value-of select="@FriendlyHref" disable-output-escaping="yes"/>
 </xsl:attribute>

       <span itemprop="name">
         <xsl:value-of select="@MenuText" disable-output-escaping="yes"/>
       </span>
 </a>
      <meta itemprop="position" content="{position()}" />
 </li>
<!--@Snippet(breadcrumb)-->
 </xsl:template>
</xsl:stylesheet>

--
Best regards

Kurt Moskjaer Andersen


Replies

 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Found out, so nevermind :)

/Kurt

 
Nay Chi Phyo Dynamicweb Employee
Nay Chi Phyo
Reply

Hi,

Are there newly released Breadcrumbs included Product Name?

I went to the product detail, but in the Breadcrumbs, the product name doesn't show. So, may I know it is customize code or setting to show the product name there?

Thanks!

Nay Chi

 
Nicolai Pedersen
Reply

Currently not.

It will however be part of Rapido 4.

 
Nay Chi Phyo Dynamicweb Employee
Nay Chi Phyo
Reply

Noted with thanks!

 

 

You must be logged in to post in the forum