View Source
  Class PreviewController
  
  
  
  
    Inheritance
      System.Object
      Microsoft.AspNetCore.Mvc.ControllerBase
      Microsoft.AspNetCore.Mvc.Controller
      
   
  
  Assembly: Umbraco.Web.BackOffice.dll
  Syntax
  
    public class PreviewController : Controller, IActionFilter, IAsyncActionFilter, IFilterMetadata, IDisposable
   
  Constructors
  
  
    View Source
  
  PreviewController(UmbracoFeatures, IOptionsSnapshot<GlobalSettings>, IPublishedSnapshotService, IBackOfficeSecurityAccessor, ILocalizationService, IHostingEnvironment, ICookieManager, IRuntimeMinifier, ICompositeViewEngine, IUmbracoContextAccessor)
  
  
  Declaration
  
    public PreviewController(UmbracoFeatures features, IOptionsSnapshot<GlobalSettings> globalSettings, IPublishedSnapshotService publishedSnapshotService, IBackOfficeSecurityAccessor backofficeSecurityAccessor, ILocalizationService localizationService, IHostingEnvironment hostingEnvironment, ICookieManager cookieManager, IRuntimeMinifier runtimeMinifier, ICompositeViewEngine viewEngines, IUmbracoContextAccessor umbracoContextAccessor)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | UmbracoFeatures | 
        features | 
         | 
      
      
        | Microsoft.Extensions.Options.IOptionsSnapshot<GlobalSettings> | 
        globalSettings | 
         | 
      
      
        | IPublishedSnapshotService | 
        publishedSnapshotService | 
         | 
      
      
        | IBackOfficeSecurityAccessor | 
        backofficeSecurityAccessor | 
         | 
      
      
        | ILocalizationService | 
        localizationService | 
         | 
      
      
        | IHostingEnvironment | 
        hostingEnvironment | 
         | 
      
      
        | ICookieManager | 
        cookieManager | 
         | 
      
      
        | IRuntimeMinifier | 
        runtimeMinifier | 
         | 
      
      
        | Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine | 
        viewEngines | 
         | 
      
      
        | IUmbracoContextAccessor | 
        umbracoContextAccessor | 
         | 
      
    
  
  Methods
  
  
    View Source
  
  Application()
  Returns the JavaScript file for preview
 
  
  Declaration
  
    public async Task<JavaScriptResult> Application()
   
  Returns
  
  
    View Source
  
  End(String)
  
  
  Declaration
  
    public ActionResult End(string redir = null)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        redir | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult | 
         | 
      
    
  
  
    View Source
  
  EnterPreview(Int32)
  
  
  Declaration
  
    public ActionResult EnterPreview(int id)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        id | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult | 
         | 
      
    
  
  
    View Source
  
  Frame(Int32, String)
  The endpoint that is loaded within the preview iframe
 
  
  Declaration
  
    [Authorize(Policy = "BackOfficeAccess")]
public ActionResult Frame(int id, string culture)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        id | 
         | 
      
      
        | System.String | 
        culture | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult | 
         | 
      
    
  
  
    View Source
  
  Index(Nullable<Int32>)
  
  
  Declaration
  
    [Authorize(Policy = "BackOfficeAccessWithoutApproval")]
public ActionResult Index(int? id = null)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Nullable<System.Int32> | 
        id | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult | 
         |