Ajax: get partial blade template

Hey @trainoasis,

I think your best bet is to do a wp_ajax call. 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 and @MWDelaney’s post about passing data.

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?

3 Likes