User tests: Successful: Unsuccessful:
Pull Request for Issue # .
With #25117 in mind and the possible adaptation of Spatie\SchemaOrg in mind I would like to prepare current breadcrumbs by converting the Microdata into JSON-LD structure.
But not only with that possible adaptation in mind... The JSON-LD format is the recommended format.
The HTML code will be cleaner when the data is moved to JSON-LD format
Another benefit of this change is that the current page will always be added to the data. This is not the case in the current situation with Hide Last Item is active.
npm run something:something
is required<nav role="navigation" aria-label="Breadcrumbs">
<ol itemscope="" itemtype="https://schema.org/BreadcrumbList" class="mod-breadcrumbs breadcrumb">
<li class="mod-breadcrumbs__here float-left">You are here: </li>
<li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem" class="mod-breadcrumbs__item breadcrumb-item">
<a itemprop="item" href="/index.php" class="pathway"><span itemprop="name">Home</span></a>
<meta itemprop="position" content="1">
</li>
<li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem" class="mod-breadcrumbs__item breadcrumb-item">
<a itemprop="item" href="/index.php/blog" class="pathway"><span itemprop="name">Blog</span></a>
<meta itemprop="position" content="2">
</li>
<li aria-current="page" itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem" class="mod-breadcrumbs__item breadcrumb-item active">
<span itemprop="name">Article</span>
<meta itemprop="position" content="3">
</li>
</ol>
</nav>
<nav role="navigation" aria-label="Breadcrumbs">
<ol class="mod-breadcrumbs breadcrumb">
<li class="mod-breadcrumbs__here float-left">You are here: </li>
<li class="mod-breadcrumbs__item breadcrumb-item"><a href="/index.php" class="pathway"><span>Home</span></a></li>
<li class="mod-breadcrumbs__item breadcrumb-item"><a href="/index.php/blog" class="pathway"><span>Blog</span></a></li>
<li class="mod-breadcrumbs__item breadcrumb-item active"><span>Article</span></li>
</ol>
</nav>
While inspecting the element and scroll to top and inspect element <head>
. It should contain the following <script>
tag.
<script type="application/ld+json">
{
"@context": "https:\/\/schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"item": {
"@id": "http:\/\/joomla4.test\/index.php",
"name": "Home"
}
},
{
"@type": "ListItem",
"position": 2,
"item": {
"@id": "http:\/\/joomla4.test\/index.php\/blog",
"name": "Blog"
}
},
{
"@type": "ListItem",
"position": 3,
"item": {
"@id": "http:\/\/joomla4.test\/index.php\/blog\/article",
"name": "Article"
}
}
]
} </script>
Status | New | ⇒ | Pending |
Category | ⇒ | Modules Front End |
Title |
|
@HLeithner can you help me how I rebase to 4.1?
You can try to just target the 4.1-dev branch in github (you can edit this PR and select another target branch).
Depending on how long it takes to merge and if 4.1-dev is uptodate it could work.
Else: https://git-scm.com/book/en/v2/Git-Branching-Rebasing
But it's maybe easier to create a new branch of the 4.1 branch and copy paste.
changed base.... already checked that mod_breadcrumbs/tmpl/default.php J4 = J4.1
Bad news: Because the 4.1-dev branch is not up to date with latest changes in the 4.0-dev branch, this PR now shows all changes in 4.0-dev since the 4.1-dev was updated to 4.0-dev last time, and not only the changes from this PR.
Maybe that will be fixed by just waiting for the next update of the 4.1-dev branch from 4.0-dev, but I'm not sure about that.
Using Patchtester I get this:
The file marked for modification does not exist: administrator/components/com_media/resources/scripts/components/toolbar/toolbar.vue
Is this to do with the base change?
Should be good now - pushed it up into 4.1-dev (needed to swap the branches around to make github realise)
Drone seems to have a problem. I think when adding a change (e.g. those requested by review above) it will be fixed.
Title |
|
I have tested this item
Worked as Expected result.
'''
<li class="mod-breadcrumbs__item breadcrumb-item"><a href="/index.php" class="pathway"><span>Home</span></a></li><li class="mod-breadcrumbs__item breadcrumb-item"><a href="/index.php/blog" class="pathway"><span>Blog</span></a></li><li class="mod-breadcrumbs__item breadcrumb-item active"><span>Welcome to your blog</span></li> </ol>
<script type="application/ld+json">
{"@context":"https:\/\/schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"https:\/\/j4.akarawuth.com\/index.php","name":"Home"}},{"@type":"ListItem","position":2,"item":{"@id":"https:\/\/j4.akarawuth.com\/index.php\/blog","name":"Blog"}},{"@type":"ListItem","position":3,"item":{"@id":"https:\/\/j4.akarawuth.com\/index.php\/blog\/3-welcome-to-your-blog","name":"Welcome to your blog"}}]} </script>
Labels |
Added:
?
|
I have tested this item
done :)!
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-10-27 13:28:22 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
We are in feature freeze for j4 please rebase to j4.1