Roots Discourse

Sage 9 & Pods Plugin - general issues

Hey all,

I’m redeveloping a theme for a site that’s been built around the Pods plugin. All’s working perfectly in terms of standard pages etc. For the ‘pages’ you create in Pods you have to then set a template for it to use. All perfectly standard.

With Sage 9 I’m getting the code for my template being echoed in the browser. This is the code making up my template and is also what I see in the browser…

{{-- Template Name: Index Item --}} @extends('') @section('content') 
@while(have_posts()) @php(the_post()) @include('') 
@include('partials.content-page') @endwhile @endsection

I’ve not seen this in any other situation, googling isn’t yielding much and so I’m really stuck… any thoughts on why the template isn’t rendering??


Issue resolved… I simply made the template pretty much blank apart from adding the below reference to a custom layout in /views/layouts.

<?= \App\template('layouts/entries'); ?>

Not best practice I’m sure but it got round the issue with the Pods plugin.

1 Like

Sorry to open this up again, but it appears there are quite a few issues with Sage 9 & Pods. Pods is fairly new to me, I always use ACF, but converting to that isn’t an option.

The @yields(), @extends() & @section() keys aren’t working. Neither are Controllers. Taking the same code out of my /layouts/entries.blade.php and placing it in /layouts/app.blade.php and then doing the same with my views/partials does work, so it’s specific to the Pods content types.

The content types created in Pods are Advanced Content Types, which apparently don’t recognize the WordPress Theme Hierarchy. I guess this issue is born from that?

The only other thing I can think of is it’s the weird template setup I have, but I can’t think of another way around that? The below image is what I see when I add my code to the template used by Pods (/views/eos-entries.blade.php).

Any input would be greatly received, thanks!

About a year later; did you find a solution, or work around? I can’t seem to find one anywhere.