How to Orchard.Theme.PJS.Bootstrap-3.3.4.nupkg in visual studio 2013

Topics: Installing Orchard, Troubleshooting, Writing themes
Mar 24, 2015 at 12:01 AM
Hi

I'm struggling with this template

When I install normally via dashboard, it never shows in vs 2013 - if i then add it and build it it shows some missing reference

Type or namespace name 'Core' does not exist in the namespace 'Orchard' (are you missing an assembly reference?)

OK then I downloaded it manually and its a .nupkg.
I knows its a nuget package but how do I installed it in my themes folder?

best regards
Developer
Mar 24, 2015 at 11:54 AM
A .nupkg is just a zip file. You can rename it with a .zip extension and extract it.
Then you can find the Theme in Content\Themes and copy/paste PJS.Bootstrap in your Themes folder.

To see the theme in VS, Right click on the 'Themes' solution folder and add an existing project : select the PJS.Bootstrap.csproj in Themes\PJS.Bootstrap

To resolve the missing reference, I had to change the Framework Target to 4.5.1 in the Properties of the project.
Developer
Mar 24, 2015 at 11:55 AM
Philip will also probably check in the changes he has made in the repository of the project he previously created on: https://bitbucket.org/psenechal/pjs.bootstrap
Mar 24, 2015 at 6:05 PM
Edited Mar 30, 2015 at 4:06 PM
Hi agriffard

Thank you for your answer - I change the framework target and add some references. It solve my problem.

But every time i tried to change the template in admin/settings/theme-bootstap, i get this error

Server Error in '/OrchardLocal' Application.
Could not find a part of the path 'C:\Users\???\Documents\My Web Sites\Orchard.Web-Site\Themes\PJS.Bootstrap\Content\Swatches'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\???\Documents\My Web Sites\Orchard.Web-Site\Themes\PJS.Bootstrap\Content\Swatches'.

Source Error:


Line 47: var folder = Request.MapPath(swatchPath);
Line 48: var swatchPattern = "*_th.png";
Line 49: var swatchFiles = Directory.EnumerateFiles(folder, swatchPattern, SearchOption.TopDirectoryOnly);
Line 50: foreach (var file in swatchFiles.OrderBy(x => x)) {
Line 51: var start = file.IndexOf(folder) + folder.Length + 1;


Source File: c:\Source\Orchard.Source.1.8.1\src\Orchard.Web\Themes\PJS.Bootstrap\Views\EditorTemplates\Parts\BootstrapThemeSettings.cshtml Line: 49

I have tried to delete \My Documents\IISExpress\config\applicationshost.config

Is this path hard coded in the source 'C:\Users\???\Documents\My Web Sites\Orchard.Web-Site\Themes\PJS.Bootstrap\Content\Swatches'

Best regards and TIA
CatFelix


Edit:

After i start using SQL Server and Localhost, the error was gone
Marked as answer by Catfelix on 3/30/2015 at 8:06 AM
Apr 14, 2015 at 9:09 PM
Same problem here.
Getting
Could not find a part of the path 'C:\Users\???\Documents\My Web Sites\Orchard.Web-Site\Themes\PJS.Bootstrap\Content\Swatches'.
when accessing admin/settings/theme-bootstap

What do you mean by "After i start using SQL Server and Localhost, the error was gone"
Apr 15, 2015 at 1:38 PM
I downloaded SQL Express (Free) and configured Orchard with IIS and SQL.

But this template is very complicated to customize and I giving it up. I'm now using The Bootstrap 3.2.0 Base Theme.
Developer
Apr 15, 2015 at 3:04 PM
There is alot to it that you need to cut out to get to what you want.

Take a look at my demo theme, should help :), https://github.com/Jetski5822/ACMEMedicalTheme
Apr 15, 2015 at 4:44 PM
Changed line 46 of PJS.Bootstrap/Views/EditorTemplates/Parts/BootstrapThemeSettings.cshtml to :

var swatchPath = Href("~/Themes/PJS.Bootstrap/Content/Swatches");

Works now.
May 8, 2015 at 9:01 PM
That's my bad...I accepted a pull request for that and obviously didn't completely check it to make sure it worked in all types of setups. I'm only running it on my production server and the pathing works fine in that situation. I'll get that change in for the next release.