# Basic blade template usage

**URL:** https://discourse.roots.io/t/basic-blade-template-usage/16034
**Category:** sage
**Tags:** blade
**Created:** 2019-07-08T19:32:46Z
**Posts:** 11
**Showing post:** 9 of 11

## Post 9 by @ericgauvin — 2019-07-13T23:04:16Z

```
/**
 * Bootstrap classes if sidebar
 **/
public function sidebarCss()
{
    return 'col-lg-8';
}

/**
 * Classes if no sidebar
 **/
public function noSidebarCss()
{
    if (is_front_page()) {
    return 'small-12';
    } else {
    return 'col-lg-8 offset-lg-2';
    }
}
```

The problem is with bbpress.

I had to add this bbpress.php file to make bbpress work within sage:

```
<?php

echo App\Template('page');
```

The main bbpress page works correctly, but if I go to any subpages within bbpress, I get the variable warning.

* * *

Solution:

It wasn’t injecting data from the App controller to the Page template for bbpress.

Below is the solution, pass the data to the template.

```
<?php

echo App\template('page', $__data);
```

Thank you Roots forums!!!

> [@Need Sage 9 developer help, memberpress, bbpress not working (possibly blade related)](https://discourse.roots.io/t/need-sage-9-developer-help-memberpress-bbpress-not-working-possibly-blade-related/11569/10):
>
> Ok, I figured it out by myself. You have to pass the data to the template call. \<?php echo App\template('page', $\_\_data);

---

_[View the full topic](https://discourse.roots.io/t/basic-blade-template-usage/16034)._
