MVC4 has a folder called Content/themes/ Is the expectation, to create any new theme under that folder? Is the default theme of MVC4 called BASE becaus there is a folder under Content/themes/ called the same.
The "Themes" folder in MVC is just a feature of jQuery UI and is not an MVC-specific feature. MVC itself does not have any actual "theme" support.
You can find additional themes as NuGet packages from the NuGet feed: http://nuget.org/packages?q=Tags%3A%22jQueryUI%22+themes
There is something like what you wish to do in the project MVC.Forum They've created a folder named ~/Themes and View Engine ForumViewEngine which searches the views in that folder. Substituting the default View Engine like so:
protected void Application_Start()
{
...
// Set the view engine
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new ForumViewEngine(defaultTheme));
...
}
Where the defaultTheme is a name of a subfolder of ~/Themes, that contains the views for the specific theme.
MVC4 has a folder called Content/themes/ Is the expectation, to create any new theme under that folder?
Not really. By default, jquery UI is included in an MVC project, if you use one of the provided templates. The base folder contains the images and styles needed by the different jQuery UI widgets, the accordion being one of them. So if you use any of those widgets you don't need to download the css
and script
files needed. You can see those files being referenced in the BundleConfig.cs
file under the App_Start
folder. This same link that is included in that file explains what it is and what it does.
If you are thinking about how Themes
in webforms are done in MVC, you can use layout pages and css files to define different themes for different situations/scenarios for your website.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With