Search code examples
xmlbloggerbreadcrumbs

Breadcrumbs in Blogger


The Breadcrumbs in my blog are not well configured and I can not solve the problem.

On both the home page where show the posts and inside them, display the first bookmark, I would like to show all the bookmarks on the main page and within the posts show the full path.

I found in my template the Breadcrumbs configuration which is as follows:

        <b:includable id='postCategory' var='post'>
          <!-- Post Label/Category -->
          <b:if cond='data:post.labels'>
            <span class='post-tag'>
              <data:post.labels.first.name/>
            </span>
          </b:if>
        </b:includable>

I tried everything and I researched a lot, but since my knowledge is not many and I did not find anything on the internet, I decided to ask for help.

Does anyone know what modifications I have to make to make it look the way I want it?

My Blog: https://xamasurbanossioux.blogspot.com/


Solution

  • To show a full clickable Breadcrumbs, you need to modify your code to the following:

    <b:includable id='postCategory' var='post'>
      <!-- Post Label/Category -->
      <b:if cond='data:post.labels'>
        <span class='post-tag'>
          <b:if cond='data:blog.url != data:blog.homepageUrl'>
            <a expr:href="data:blog.homepageUrl"><data:messages.home/></a> &gt;&gt;
          </b:if>
          <b:loop values='data:post.labels' var='label'>
            <a expr:href="data:label.url"><data:label.name/></a>
            <b:if cond='data:label.isLast != "true"'>&gt;&gt;</b:if>
          </b:loop>
          <b:if cond='data:blog.url != data:blog.homepageUrl'>
            &gt;&gt;<span><data:post.title/></span> 
          </b:if>
        </span>
      </b:if>
    </b:includable>