@extends('layouts.app') @section('content') @include('partials.page-header') @php $database_terms = [ 'icarus_database_theme' => [ 'terms' => get_terms( array( 'taxonomy' => 'icarus_database_theme', 'hide_empty' => true, )), 'label_name' => 'theme' ], 'icarus_database_applicability' => [ 'terms' => get_terms( array( 'taxonomy' => 'icarus_database_applicability', 'hide_empty' => true, )), 'label_name' => 'applicability' ] ] @endphp @include('partials.ajax-filter', ['terms' => $database_terms])
@while (have_posts()) @php the_post() @endphp @php $type = get_the_terms( get_the_ID(), 'icarus_database_type' )[0]; @endphp
@if (get_field('database_link'))
{!! the_title() !!}
@php if (isset($type)) { echo $type->name; } @endphp
@php $theme_obj_list = get_the_terms( get_the_ID(), 'icarus_database_theme' ); if (!empty($theme_obj_list)) { $terms_string = strtolower(join(', ', wp_list_pluck($theme_obj_list, 'name'))); echo $terms_string; } @endphp
@php $app_obj_list = get_the_terms( get_the_ID(), 'icarus_database_applicability' ); if (!empty($app_obj_list)) { $terms_string = join(', ', wp_list_pluck($app_obj_list, 'name')); echo $terms_string; } @endphp
@else
@php if (isset($type)) { echo $type->name; } @endphp
{!! the_title() !!}
@php $theme_obj_list = get_the_terms( get_the_ID(), 'icarus_database_theme' ); if (!empty($theme_obj_list)) { $terms_string = strtolower(join(', ', wp_list_pluck($theme_obj_list, 'name'))); echo $terms_string; } @endphp
@php $app_obj_list = get_the_terms( get_the_ID(), 'icarus_database_applicability' ); if (!empty($app_obj_list)) { $terms_string = join(', ', wp_list_pluck($app_obj_list, 'name')); echo $terms_string; } @endphp
@endif
@endwhile
@endsection