/**
* Returns the output of the client and adds the header.
*
* @param string $clientName Html client name
* @return string HTML code for inserting into the HTML body
*/
protected function getOutput($clientName)
{
$tmplPaths = $this->aimeos->get()->getCustomPaths('client/html/templates');
$context = $this->context->get($this->request);
$langid = $context->getLocale()->getLanguageId();
$view = $this->viewContainer->create($context, $this->uriBuilder, $tmplPaths, $this->request, $langid);
$client = \Aimeos\Client\Html\Factory::createClient($context, $tmplPaths, $clientName);
$client->setView($view);
$client->process();
$this->view->assign('aimeos_component_header', (string) $client->getHeader());
return $client->getBody();
}