79343960

Date: 2025-01-09 20:33:00
Score: 1.5
Natty:
Report link

@BenderBoy has a good point there. I am not familiar with Go. But on your endpoints you should have access to request and response. Check the "HX-Request" header in the request.

if (headers['hx-request'] == true) {
  return partial_page;
} else {
  return full_page;
}

Depends on your UI framework. But with templating your partial_page would be included in your full_page.

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @BenderBoy
  • Looks like a comment (1):
Posted by: abedurftig