Showing posts with label Orchard. Show all posts
Showing posts with label Orchard. Show all posts

Friday, June 3, 2016

Creating a new Orchard Module

If you want to create a new Orchard module, you might go through all the trouble of mimicking or copying an existing Orchard module in Visual Studio, but it is much, much easier to simply create a new Orchard module using the Orchard command line!

To get started, you can open an Administrative command prompt at the location of the Orchard.Web bin directory and run orchard.exe:


In order to be able to generate a new Orchard module, you will first have to enable the Code Generation feature as follows:


Next, you will want to actually create your module using the following command:


However, you might encounter the following error message:


Therefore, in order to resolve this issue, you will want to change the flag /IncludeInSolution:true to /IncludeInSolution:false:


Next, you will want to manually add the project to the Visual Studio solution in the Modules directory.

Once it has been added to the Visual Studio solution, you can update OrchardVersion in the Module.txt file to match your current version of Orchard such as this:

OrchardVersion: 1.9

Once you have that in place, you are ready to work with your new Module in Orchard!

Getting starting with Orchard development

If you are staring to work with Orchard CMS, you may be wondering how to get started with Orchard development.

Well, first of all, the easiest thing is to download the source code for Orchard CMS from GitHub here: https://github.com/OrchardCMS/Orchard

You can then click on the "Clone or download" button in order to get the .zip file for all of the source code by subsequently clicking "Download ZIP":



Once you have downloaded and extracted the .zip file, you can then open the Orchard solution in Visual Studio:


Once the solution is open in Visual Studio, you are ready to begin developing using Orchard CMS!


Tuesday, February 3, 2015

Changing the database connection string in Orchard CMS

If you are looking for the database connection string in Orchard CMS, as you may have figured out, it is not in the Web.config file as you would normally expect.

Instead, you can find a file called Settings.txt in the App_Data/Sites/Default folder.

In that file, you will find an element called DataConnectionString where you can change the database connection string to the appropriate value!