@if(!empty($forumMicrodata['canonical']))
@endif
@if(!empty($forumMicrodata['canonical']))
@endif
@if(!empty($forumMicrodata['title']))
@endif
@php
$topicText = trim((string) ($forumMicrodata['text'] ?? ''));
if ($topicText === '') {
$topicText = trim((string) ($forumMicrodata['title'] ?? ''));
}
@endphp
@if($topicText !== '')
@endif
@if(!empty($forumMicrodata['date_published']))
@endif
@if(!empty($forumMicrodata['date_modified']))
@endif
@if(isset($forumMicrodata['comment_count']))
@endif
@if(!empty($forumMicrodata['author']))
@if(!empty($forumMicrodata['author']['url']))@endif
@if(!empty($forumMicrodata['author']['name']))@endif
@endif
@if(!empty($forumMicrodata['board']))
@if(!empty($forumMicrodata['board']['url']))
@endif
@if(!empty($forumMicrodata['board']['name']))
@endif
@if(!empty($forumMicrodata['board']['category']))
@if(!empty($forumMicrodata['board']['category']['url']))@endif
@if(!empty($forumMicrodata['board']['category']['name']))@endif
@endif
@endif
@foreach(($forumMicrodata['interactions'] ?? []) as $interaction)
@if(!empty($interaction['type']))@endif
@if(isset($interaction['count']))@endif
@endforeach
@foreach(($forumMicrodata['comments'] ?? []) as $comment)
@if(!empty($comment['url']))
@endif
@if(!empty($comment['text']))
@endif
@if(!empty($comment['date_published']))
@endif
@if(!empty($comment['date_modified']))
@endif
@if(!empty($comment['author']))
@if(!empty($comment['author']['url']))@endif
@if(!empty($comment['author']['name']))@endif
@endif
@foreach(($comment['interactions'] ?? []) as $interaction)
@if(!empty($interaction['type']))@endif
@if(isset($interaction['count']))@endif
@endforeach
@endforeach
@elseif(($forumMicrodata['kind'] ?? null) === 'collection')
@if(!empty($forumMicrodata['canonical']))
@endif
@if(!empty($forumMicrodata['name']))
@endif
@if(!empty($forumMicrodata['description']))
@endif
@if(!empty($forumMicrodata['list_name']))
@endif
@foreach(($forumMicrodata['items'] ?? []) as $index => $item)
@php
$itemType = $item['type'] ?? 'WebPage';
$itemText = trim((string) ($item['text'] ?? ''));
$itemAuthor = $item['author'] ?? null;
if ($itemType === 'DiscussionForumPosting') {
if ($itemText === '') {
$itemText = trim((string) ($item['description'] ?? $item['title'] ?? ''));
}
if (empty($itemAuthor)) {
$fallbackAuthorName = trim((string) ($item['uname'] ?? $item['author_name'] ?? ''));
if ($fallbackAuthorName !== '') {
$itemAuthor = ['name' => $fallbackAuthorName];
}
}
}
@endphp
@if(!empty($item['url']))
@endif
@if(!empty($item['title']))
@endif
@if(!empty($item['description']))
@endif
@if(!empty($itemText))
@endif
@if(!empty($item['date_published']))
@endif
@if(isset($item['comment_count']))
@endif
@if(!empty($item['date_modified']))
@endif
@if(!empty($itemAuthor))
@if(!empty($itemAuthor['url']))@endif
@if(!empty($itemAuthor['name']))@endif
@endif
@endforeach