Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: content type place view notice #842

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 40 additions & 38 deletions views/v3/content-type-place.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,45 +79,47 @@
@stop

@section('below')
@foreach ($relatedPosts as $postType => $posts)
<div class="o-grid">
@group([
'justifyContent' => 'space-between'
])
@typography([
'element' => 'h2'
@if(!empty($relatedPosts))
@foreach ($relatedPosts as $postType => $posts)
<div class="o-grid">
@group([
'justifyContent' => 'space-between'
])
{{ $lang->related }} {{ $postType }}
@endtypography
@if (!empty(get_post_type_archive_link($postType)))
@link([
'href' => get_post_type_archive_link($postType)
])
{{ $lang->showAll }}
@endlink
@endif
@endgroup
@foreach ($posts as $post)
<div class="o-grid-4@md u-margin__bottom--8">
@segment([
'layout' => 'card',
'title' => $post->postTitleFiltered,
'content' => !empty($post->excerptShorter) ? $post->excerptShorter : false,
'image' => !empty($post->thumbnail['src']) ? $post->thumbnail['src'] : false,
'buttons' => [['text' => $labels['readMore'], 'href' => $post->permalink]],
'tags' => !empty($post->termsUnlinked) ? $post->termsUnlinked : false,
'meta' => !empty($post->readingTime) ? $post->readingTime : false,
'icon' => !empty($post->termIcon['icon']) ? $post->termIcon : false
@typography([
'element' => 'h2'
])
@if ($post->callToActionItems['floating'])
@slot('floating')
@icon($post->callToActionItems['floating'])
@endicon
@endslot
{{ $lang->related }} {{ $postType }}
@endtypography
@if (!empty(get_post_type_archive_link($postType)))
@link([
'href' => get_post_type_archive_link($postType)
])
{{ $lang->showAll }}
@endlink
@endif
@endsegment
</div>
@endforeach
</div>
@endforeach
@endgroup
@foreach ($posts as $post)
<div class="o-grid-4@md u-margin__bottom--8">
@segment([
'layout' => 'card',
'title' => $post->postTitleFiltered,
'content' => !empty($post->excerptShorter) ? $post->excerptShorter : false,
'image' => !empty($post->thumbnail['src']) ? $post->thumbnail['src'] : false,
'buttons' => [['text' => $labels['readMore'], 'href' => $post->permalink]],
'tags' => !empty($post->termsUnlinked) ? $post->termsUnlinked : false,
'meta' => !empty($post->readingTime) ? $post->readingTime : false,
'icon' => !empty($post->termIcon['icon']) ? $post->termIcon : false
])
@if ($post->callToActionItems['floating'])
@slot('floating')
@icon($post->callToActionItems['floating'])
@endicon
@endslot
@endif
@endsegment
</div>
@endforeach
</div>
@endforeach
@endif
@stop
Loading