How do I get a template without the navbar?

Is it possible to use jQuery to .get() the output of a PHP template? When I try to do this, the top nav bar becomes completely messed up because the output of TemplateResponse() seems to include the nav bar itself. The other response types don’t process the template at all. What am I missing?

The PHP code of your app does not include the top nav bar (I assume you mean the blue one from nextcloud). However, the output of your PHP is ‘injected’ into the nextcloud HTML page and then sent as HTML to the browser. So yes, when you do a get request you should receive the whole page including the nav bar.

It could be that you include some css selectors in your php file that influence the appearance of the nav bar?

You can use the ‘blank’ value:

	$html = new TemplateResponse('your_app', 'templateName', [], 'blank');

You rock! That fixed the problem right up. I had looked at the docs, but didn’t understand what those parameters meant. Many thanks!