# Ajax: get partial blade template

**URL:** https://discourse.roots.io/t/ajax-get-partial-blade-template/12656
**Category:** sage
**Tags:** sage9, blade
**Created:** 2018-06-11T12:44:43Z
**Posts:** 17
**Showing post:** 4 of 17

## Post 4 by @mmirus — 2018-06-12T19:17:26Z

Hey @trainoasis,

I think your best bet is to do a wp\_ajax call. [https://codex.wordpress.org/AJAX\_in\_Plugins](https://codex.wordpress.org/AJAX_in_Plugins)

The action you hook onto that call should prepare any data your partial needs and then call `Template()` passing in the partial path and the data. See [the thread I linked to above](https://discourse.roots.io/t/how-can-i-return-a-view-from-an-ajax-call/12595/4?u=mmirus) and @MWDelaney’s [post about passing data.](https://discourse.roots.io/t/shortcodes-that-use-blade-templates-and-get-controller-data/9946)

The action could be a static method on a controller (the app controller, for example).

Does that help get you any further in the process?

---

_[View the full topic](https://discourse.roots.io/t/ajax-get-partial-blade-template/12656)._
