Skip to content

Instantly share code, notes, and snippets.

@carlwoodhouse
Created September 28, 2017 13:15
Show Gist options
  • Save carlwoodhouse/d8d729290ff7ee2b67f845dc671646d2 to your computer and use it in GitHub Desktop.
Save carlwoodhouse/d8d729290ff7ee2b67f845dc671646d2 to your computer and use it in GitHub Desktop.
using Orchard.Themes;
namespace Something.Themes {
public class CustomThemeSelector : IThemeSelector {
public ThemeSelectorResult GetTheme(RequestContext context) {
if (someCondition) {
return new ThemeSelectorResult {
Priority = 10,
ThemeName = selectedTheme
};
}
return null;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment