# Sage9 Template & Wrapper

**URL:** https://discourse.roots.io/t/sage9-template-wrapper/11769
**Category:** sage
**Tags:** sage9, blade
**Created:** 2018-03-01T11:56:43Z
**Posts:** 7
**Showing post:** 2 of 7

## Post 2 by @ben — 2018-03-01T17:31:02Z

Pasting from [the Sage book](https://roots.io/books/theme-development-with-sage/):

## Rendering Blade templates from PHP (eg. hooks/actions and filters)

Find yourself needing to render a Blade template with PHP? Use the `template` helper function available in the `App` namespace.

Here’s an example of adding a `[reviews]` shortcode that renders the `partials/reviews.blade.php` file:

```
add_shortcode('reviews', function($atts) {
    return \App\template('partials.reviews');
});
```

---

_[View the full topic](https://discourse.roots.io/t/sage9-template-wrapper/11769)._
