{{-- Template Name: Impact Report 2022 People&Planet --}} @extends('layouts.app') @section('content') @php global $post; $classcategory = get_field('people_or_planet'); $childrenArgs = array( 'post_parent' => $post->ID, 'post_type' => 'page', 'orderby' => 'date', 'order' => 'ASC', 'numberposts' => -1, ); $children = get_children($childrenArgs); error_log(json_encode($children)); $pillar1ID = 0; $pillar2ID = 0; $pillar3ID = 0; $pillar4ID = 0; foreach ($children as $child) { if ($pillar1ID == 0) { $pillar1ID = $child->ID; } else if ($pillar2ID == 0) { $pillar2ID = $child->ID; } else if ($pillar3ID == 0) { $pillar3ID = $child->ID; } else if ($pillar4ID == 0) { $pillar4ID = $child->ID; break; } } $firstLink = get_permalink($pillar1ID); $secondLink = get_permalink($pillar2ID); $thirdLink = get_permalink($pillar3ID); $fourthLink = get_permalink($pillar4ID); $title = ($classcategory == 'people') ? 'PEOPLE' : 'PLANET'; $description = ($classcategory == 'people') ? 'Our creative vision elevates our employees, our communities and our industry. Providing new opportunities upheld by deeply rooted values drives us forward, together.' : 'Our dedication to reduce our footprint while safeguarding and regenerating nature creates lasting positive change,  enriching vital ecosystems and uplifting communities. Through transparency, accountability and circular innovation we are acting for a better tomorrow.'; $firstSquareTitle = ($classcategory == 'people') ? 'Empowering Equity,
Enhancing Community' : 'Transformation
through Reduction'; $secondSquareTitle = ($classcategory == 'people') ? 'Chime In
for Gender Equality' : 'Materials Designed
for Disruption'; $thirdSquareTitle = ($classcategory == 'people') ? 'Preserving Craft and Supporting
Suppliers for Tomorrow ' : 'Circularity Enhancing
a Modern Vision'; $fourthSquareTitle = ($classcategory == 'people') ? 'Changemakers
Inspiring Change' : 'Regenerating
and Conserving Nature'; @endphp
{{ $title }}
{{ $description }}

@if ($classcategory == 'people') {!! $firstSquareTitle !!} @else {!! $thirdSquareTitle !!} @endif

", "", $firstSquareTitle ) : str_replace("
", "", $thirdSquareTitle ) }}"> Read more

@if ($classcategory == 'people') {!! $thirdSquareTitle !!} @else {!! $fourthSquareTitle !!} @endif

", "", $thirdSquareTitle ) : str_replace("
", "", $fourthSquareTitle ) }}"> Read more

@if ($classcategory == 'people') {!! $fourthSquareTitle !!} @else {!! $firstSquareTitle !!} @endif

", "", $fourthSquareTitle ) : str_replace("
", "", $firstSquareTitle ) }}"> Read more
@endsection