# Best Practice / Resources for Blade

**URL:** https://discourse.roots.io/t/best-practice-resources-for-blade/8341
**Category:** sage
**Tags:** sage9, blade
**Created:** 2016-12-16T20:07:36Z
**Posts:** 180
**Showing post:** 48 of 180

## Post 48 by @kaisermann — 2017-02-07T19:19:32Z

Nope. I need it in the `base.blade.php` file.

This is what I’m currently doing:

**templates/layouts/base.blade.php** :

```
...
	<div id="page-wrapper" role="document">
		<div class="page-container" data-namespace="{!! $current_template !!}">
			....			
		</div>
	</div>
...
```

**src/controller.php:**

```
add_filter( 'sage/template/global/data', function( $data, $template ) {
	return [
		'current_template' => basename( $template ,'.blade.php' ),
	];
}, 10, 2 );
```

---

_[View the full topic](https://discourse.roots.io/t/best-practice-resources-for-blade/8341)._
