Closed wetory closed 3 years ago
It's fairly simple code, and ultimately, just a basic class.
I've not tried it, but I think that each template lookup is done independently of any other, so the effort to nest these lookups should work - but please try and let me know!
@wetory yes - I do this all the time
$template_loader = new Template_Loader();
$template_loader->set_template_data(
array(
'template_loader' => $template_loader,
// and what ever
)
);
then in the template you can use
$data->template_loader->get_template_part( 'whatever');
Works fine
Hello is it possible to use template loader inside template that is called within get_template_part function? For example, template for table which iterates data and load row template for every item. Thank you in advance.