Exemple #1
0
 public IActionResult Index(PageModel currentPageModel, Guid?previewGlobalBlock = null)
 {
     if (previewGlobalBlock != null && _authorizationService.HasOperation(Operations.Function.Websites.UI))
     {
         return(View("Index", _builder.ForPreviewGlobalBlock(previewGlobalBlock.Value)));
     }
     return(View(_builder.Build(currentPageModel)));
 }
Exemple #2
0
        public ActionResult Index(PageModel currentPageModel)
        {
            var previewBlockId = Request.QueryString["previewGlobalBlock"];

            if (!string.IsNullOrEmpty(previewBlockId) && Guid.TryParse(previewBlockId, out var blockId) && _authorizationService.HasOperation(Operations.Function.Websites.UI))
            {
                return(View("Index", _builder.ForPreviewGlobalBlock(blockId)));
            }
            return(View(_builder.Build(currentPageModel)));
        }