Skip to content

Commit

Permalink
itemlist json-ld
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebacker committed Aug 23, 2019
1 parent aff7c1c commit be6b902
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/resources/views/public/_itemlist-json-ld.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script type="application/ld+json">
{
"@context":"https://schema.org",
"@type":"ItemList",
"itemListElement":[
@foreach ($items as $item)
{
"@type":"ListItem",
"position":{{ $loop->index+1 }},
"url":"{{ $item->uri() }}"
}@if (!$loop->last),@endif
@endforeach
]
}
</script>
1 change: 0 additions & 1 deletion src/resources/views/public/_list-item.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@include('places::public._json-ld')
<li class="place-list-item" id="item-{{ $place->id }}">
@if ($place->latitude && $place->longitude)
<a class="place-list-item-btn-map" href="" title="{{ __('db.Show on map') }}"><i class="fa fa-map-marker"></i><span class="sr-only">{{ __('db.Show on map') }}</span></a>
Expand Down
2 changes: 2 additions & 0 deletions src/resources/views/public/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
@include('files::public._documents', ['model' => $page])
@include('files::public._images', ['model' => $page])

@include('places::public._itemlist-json-ld', ['items' => $models])

<div class="row">

<div class="col-sm-4">
Expand Down

0 comments on commit be6b902

Please sign in to comment.