Skip to content

Instantly share code, notes, and snippets.

@Log1x
Last active May 11, 2024 21:02
Show Gist options
  • Save Log1x/d02f35f6f9de5f1a5078a3807c6a36c2 to your computer and use it in GitHub Desktop.
Save Log1x/d02f35f6f9de5f1a5078a3807c6a36c2 to your computer and use it in GitHub Desktop.
The Events Calendar (Sage 10)
# events/default-template.blade.php
@extends('layouts.app')
@section('content')
{!! tribe(
\Tribe\Events\Views\V2\Template_Bootstrap::class
)->get_view_html() !!}
@endsection
<?php
use Illuminate\Support\Str;
use function Roots\view;
add_filter('tribe_template_file', function ($file) {
$path = str_replace('/', '.', Str::after(basename($file, '.php'), 'v2/'));
return view()->exists("events.{$path}")
? view("events.{$path}")->makeLoader()
: $file;
});
@joshuafredrickson
Copy link

I try not to use it if at all possible. :) It's a headache in so many ways.

This snippet gets me most of the way there for a basic install, and for anything else, I reach for supermundano/sage-the-events-calendar, which has its own limitations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment