Pregunta

I installed this theme (http://gallery.orchardproject.net/List/Themes/Orchard.Theme.Bootstrap) on my Orchard site. Now, I would like to make certain modifications of Views/Styles/Scripts/...

After some time, a new version of original Bootstrap theme will come along with some bug fixes and whatnot. If I install that new version, all my modifications will be lost.

I watched in Pluralsight fundamentals video that the practice is to make a copy of installed theme and setting a base theme for newly created theme to the original theme. After that I am free to make modifications on a copied theme and update the original theme at any time. Eveything I have overriden in copied theme will stay as I specified, while for everything else, copied theme will fallback to its base original theme that is always updating.

Unfortunately, Bootstrap theme is different than the simple "The Theme Machine" or "Minty" themes. The latter ones are simple folders containing "Styles" and "Views" subfolders along with "Theme.txt" and "Placement.info" files. The Bootstrap theme, however, comes as a separate project. I don't know even how to properly include it in a Visual Studio project, let alone extend it to achieve the desired functionality.

How would you use Bootstrap theme in your Orchard site?

¿Fue útil?

Solución

You can use the command line to generate a theme based off Bootstrap:

codegen theme MyTheme /BasedOn:PJS.Bootstrap

This should work fine. I did have a few issues 6 months ago when I was basing a theme off Bootstrap, I'm not sure if he has pushed the fixes to the gallery, else you may need to get the latest code off his repository.

Note: Also if you read his description, the currently supported Bootstrap theme the developer is working on is actually http://gallery.orchardproject.net/List/Themes/Orchard.Theme.PJS.Bootstrap/3.0.3, so that is probably a good place to get your theme from. Also, if you are running Orchard 1.8 this theme will not work as it runs off .net 4, not 4.5.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top