Sage 9 Templates For Plugins

sage9

#1

I’ve been digging around the topics regarding wc and it’s templates with blade but still can’t seem to come up with a solution for my issue.

I’m staring a buddypress theme on sage 9 and am having problem bulling it’s base templates.

Per the BP docs the groups index page is implemented at /buddypress/members/index-register.php

This works as stated - when theme_root/buddypress/members/index-register.php exists it does render.

The problem I am encountering is that because it sits above the blade templates folder none of the blade directives like @extends work.

Anyone have a solution to this?


#2

You will most likely have to use the @section tag. Here’s a sample from my front page.

File: front-page.blade.php

@extends('layouts.base')

@section('content')
<section id="about">
    <!-- html here -->
</div>
@endsection

#3

Is your font-page.blade file inside the templates directory?

I’m assuming it is but if not then how did you get the filters working to direct Sage to pick it up from a folder above the templates folder while still honoring the blade directives?


#4

I basically have the same problem with bbPress. I can put a bbpress.php template in the resources directory, but can’t get it to work with blade (extending layouts etc.).