davidhayden-ci - Switcheroo.OrchardCore 1.0.0-rc2-8

Switcheroo allows administrator to change theme for session using query parameter.

PM> Install-Package Switcheroo.OrchardCore -Version 1.0.0-rc2-8 -Source https://www.myget.org/F/davidhayden-ci/api/v3/index.json

Copy to clipboard

> nuget.exe install Switcheroo.OrchardCore -Version 1.0.0-rc2-8 -Source https://www.myget.org/F/davidhayden-ci/api/v3/index.json

Copy to clipboard

> dotnet add package Switcheroo.OrchardCore --version 1.0.0-rc2-8 --source https://www.myget.org/F/davidhayden-ci/api/v3/index.json

Copy to clipboard
<PackageReference Include="Switcheroo.OrchardCore" Version="1.0.0-rc2-8" />
Copy to clipboard
source https://www.myget.org/F/davidhayden-ci/api/v3/index.json

nuget Switcheroo.OrchardCore  ~> 1.0.0-rc2-8
Copy to clipboard

> choco install Switcheroo.OrchardCore --version 1.0.0-rc2-8 --source https://www.myget.org/F/davidhayden-ci/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "davidhayden-ci" -SourceLocation "https://www.myget.org/F/davidhayden-ci/api/v2"
Install-Module -Name "Switcheroo.OrchardCore" -RequiredVersion "1.0.0-rc2-8" -Repository "davidhayden-ci" -AllowPreRelease
Copy to clipboard

Switcheroo.OrchardCore

Custom module for Orchard Core CMS that allows the administrator to change the active theme for the current session by specifying the theme name using a query string parameter. This allows the administrator to view a theme other than the currently active website theme.

Status

Build status Status

Getting Started

  • Add the NuGet package, Switcheroo.OrchardCore, to the Orchard Core CMS Website.
  • Launch the application and sign in as an administrator.
  • Enable the Switcheroo Module from the admin dashboard.
  • Enable any themes you wish to view from your browser session.
  • Browse to the homepage of the website.
  • Append ?theme= to the URL of your website and hit RETURN, where is the name of an enabled theme on the website. The theme on the website should change to that theme after the request.
  • Switch as necessary to other themes using the same technique.
?theme=TheAgencyTheme

?theme=TheBlogTheme

?theme=SafeMode

Troubleshooting

If you are not signed in as an administrator, Switcheroo will ignore your request.

Switcheroo does not validate the theme name. Make sure you choose a theme that is enabled for your website. It's not enough for the theme to be installed. The theme must be enabled or you will get an error.

If you choose a theme that does not exist, Orchard Core will ignore Switcheroo.

If you choose a theme that has been installed, but has not been enabled, Orchard Core will display an error. Either enable the theme or choose another to avoid the error.

Switching to a theme that does not support your custom website modifications could provide undesirable results. This is normal.

Switcheroo adds a cookie with the theme name you supplied in the query string. You can delete this cookie during your session. If the query string parameter and cookie do not exist during a request, Switcheroo will do nothing to override the currently active theme.

Road map

There are no plans to add any additional features to the code.

Credits

Created and maintained by David Hayden.

  • .NETCoreApp 3.1
    • OrchardCore.Module.Targets (>= 1.0.0-rc2-13450)
    • OrchardCore.Themes (>= 1.0.0-rc2-13450)
  • .NETCoreApp 3.1: 3.1.0.0

Owners

David Hayden

Authors

David Hayden

Project URL

https://github.com/davidhayden/Switcheroo

License

MIT

Tags

OrchardCore

Info

7 total downloads
7 downloads for version 1.0.0-rc2-8
Download (9.04 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
1.0.0-rc2-8 9.04 KB Tue, 30 Jun 2020 14:29:20 GMT 7