public function showByIdAction(Request $request, $viewId, $entityId = null)
    {
        $parameters = [
            'viewId' => $viewId,
            'locale' => $request->getLocale(),
        ];
        if ($entityId) {
            $parameters['entityId'] = $entityId;
        }
        $page = $this->get('victoire_page.page_helper')->findPageByParameters($parameters);

        return $this->redirect($this->generateUrl(
            'victoire_core_page_show',
            array_merge(
                ['url' => $page->getReference()->getUrl()],
                $request->query->all()
            )
        ));
    }