public function typeAction($contentDocument, $_format, Request $request)
    {
        if (!$contentDocument || ! $contentDocument instanceof Page) {
            throw new NotFoundHttpException('Content not found');
        }
        if ($this->container->has('profiler')) {
        	$this->container->get('profiler')->disable();
        }
        $isAdminUi = $request->query->get('admin', false) && $this->container->get('security.context')->isGranted('ROLE_ADMIN');

        $data = $params = $this->formatter->format($contentDocument);
		if("html" == $_format) {
	        $params = array(
	            'cmfMainContent' => $contentDocument,
	        	'jsData' => $data,
	        	'settings' => array("currentPath"=>"/","urlBase"=>"/"),
	        	'isAdminUI' => $isAdminUi,
	        	'serializationContext' => $this->getSerializerContext(array('front'))
	        );
		}

        return $this->renderResponse('ApplicationToguApplicationModelsBundle:Default:index.html.twig', $params);
    }