/**
* Displays details of a page
*
* @return Response
*/
public function show()
{
// what does it mean to be in editing mode? right now it is just when you are logged in
$editing = !is_null(\Auth::user());
//&& Input::get('editing', false);
$pageVersionHash = $this->Input->get('page_version_share', null);
$pageVersionName = $this->Input->get('page_version', null);
$page = $pageVersionHash ? $this->PagesRepository->findByRouteNameAndPreviewHash($this->Route->currentRouteName(), $pageVersionHash) : $this->PagesRepository->findByRouteName($this->Route->currentRouteName(), $pageVersionName, $editing);
$localized = $this->PagesRepository->findLocalizedPage($page);
return $localized ? $this->Redirect->route($localized->route_name) : $this->retrieveResponse($page);
}