• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: google complains about my cmsms breadcrumb schema
PostPosted: Sun Jan 26, 2020 10:31 am 
Offline
New Member
New Member

Joined: Fri Jan 27, 2017 2:53 pm
Posts: 9
Dear experts,

first of all: thank You for the great software!!!

I got email from google search console. They complain about the (in their words) deprecated breadcrumb schema used by cmsms. As I think it is a bad idea to argue with a web-crawling roboter, I want to make this machine happy.

In the source code of my web pages I find the schema "http://data-vocabulary.org/Breadcrumb". I found out that it is possible to specify a diferent template for Navigator's breadcrumb generation, so I tried to change the breadcrumb template. But as I am a real bad programmer I clearly failedn to generate something like this (example code from schema.org):

\$1:
    <ol vocab="http://schema.org/" typeof="BreadcrumbList">
      <li property="itemListElement" typeof="ListItem">
        <a property="item" typeof="WebPage" href="https://example.com/dresses">
         <span property="name">Dresses</span></a>
         <meta property="position" content="1">
      </li>
      <li property="itemListElement" typeof="ListItem">
        <a property="item" typeof="WebPage" href="https://example.com/dresses/real">
        <span property="name">Real Dresses</span></a>
        <meta property="position" content="2">
      </li>
    </ol>


Now my idea is: I am sure I am neither the firs person nor the only having this issue.

Is there a good (or at least better) programmer out there willing to share his code?

Thank You in advance!

Martin


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: google complains about my cmsms breadcrumb schema  Topic is solved
PostPosted: Sun Jan 26, 2020 4:25 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 906
Location: Victoria, BC
Something like this?

\$1:
<ol vocab="http://schema.org/" typeof="BreadcrumbList">
  {foreach $nodelist as $node}
    <li property="itemListElement" typeof="ListItem">
      <a property="item" typeof="WebPage" href="{$node->url}">
        <span property="name">{$node->menutext}</span>
      </a>
      <meta property="position" content="{$node@iteration}">
    </li>
  {/foreach}
</ol>

_________________
Not getting the answer you need? CMSMS support options


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: google complains about my cmsms breadcrumb schema [solve
PostPosted: Sun Jan 26, 2020 9:13 pm 
Offline
New Member
New Member

Joined: Fri Jan 27, 2017 2:53 pm
Posts: 9
Yes, great! Thank You very much! That really helped me! :)

So this is what my "main" template Simplex looks like now:

\$1:
<div class='content-top cf' itemscope itemtype='http://schema.org/breadcrumb'>
{Navigator action='breadcrumbs' template='Breadcrumbs_schema_org'}
<span class='title-border' aria-hidden='true'></span>
</div>


And this is what my Breadcrumb_schema_org Template looks like now:

\$1:
{* modified breadcrumbs template *}
{strip}
  <div class="breadcrumb" style="display:inline">{if isset($starttext)}{$starttext}:&nbsp;{/if}
    <ol vocab="http://schema.org/" typeof="BreadcrumbList" style="white-space:nowrap;display:inline-block">
      {foreach $nodelist as $node}
        <li property="itemListElement" typeof="ListItem" style="display:inline-block">
          {if ($node@iteration > 1)}&nbsp;>&nbsp;{/if}
          <a property="item" typeof="WebPage" href="{$node->url}"
            <span property="name">{$node->menutext}</span>
          </a>
          <meta property="position" content="{$node@iteration}">
        </li>
      {/foreach}
    </ol>
  </div>
{/strip}


I added some stuff to prevent line returns and make the line more pretty. I should have done that with css maybe, but maybe I will do that later... :)

Have a nice evening & week!
Martin


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: google complains about my cmsms breadcrumb schema [solve
PostPosted: Tue Jan 28, 2020 8:27 pm 
Offline
New Member
New Member

Joined: Fri Jan 27, 2017 2:53 pm
Posts: 9
Sorry, forgot a closing >

So, this is correct:

\$1:
    <ol vocab="http://schema.org/" typeof="BreadcrumbList">
      <li property="itemListElement" typeof="ListItem">
        <a property="item" typeof="WebPage" href="https://example.com/dresses">
         <span property="name">Dresses</span></a>
         <meta property="position" content="1">
      </li>
      <li property="itemListElement" typeof="ListItem">
        <a property="item" typeof="WebPage" href="https://example.com/dresses/real">
        <span property="name">Real Dresses</span></a>
        <meta property="position" content="2">
      </li>
    </ol>


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
A2 Hosting