Nucleus .Net Core CMS

HttpContextExtensions Class

Namespace: Nucleus.ViewFeatures
Assembly: Nucleus.ViewFeatures.dll
Extension methods for HttpContext.
GetTheme (HttpContext context)
Return the user's selected control panel theme setting.
Parameters
Name Type
context Microsoft.AspNetCore.Http.HttpContext
IsTopDockSelected (HttpContext context)
Return the user's selected control panel sidebar docking setting.
Parameters
Name Type
context Microsoft.AspNetCore.Http.HttpContext
NucleusRedirect (HttpContext context, String location)
Return a custom "Nucleus redirect" response. We use the X-Location header rather than location because browsers automatically follow regular redirects, and when we do a POST using jQuery.ajax we want to handle these as a full page redirect, rather than what the browser would do, which is replace the AJAX response with the contents of the redirect location url. Nucleus redirects are handled in nucleus-shared.js.
Parameters
Name Type
context Microsoft.AspNetCore.Http.HttpContext
location String