orchardcms

Orchard data insert/delete for non content item

孤者浪人 提交于 2019-11-30 19:49:37
问题 I am intending to insert/delete some information in a module's Action (using Orchard Rules-Action API) in a one-column table in the database. What is the best way of doing such tasks i.e. Data manipulation of non-content items. I do not want to go by the "Create a content type" route. I simply want to persist some non-content data in the database and query/delete them. namespace xyz.Models { public class Task { public virtual int ContentId { get; set; } public virtual int Retries { get; set;

How to deploy Orchard CMS in Windows Azure?

随声附和 提交于 2019-11-30 09:51:28
Experts, Is there any of you guys who has successfully built and deployed Orchard CMS (1.1 and above) in Azure? I've tried to build the source codes (pulled from Codeplex repo) as suggested here: http://www.orchardproject.net/docs/Deploying-Orchard-to-Windows-Azure.ashx but keep on failing. If you see the comments of that article, you'll see some people are having the same problem with the ClickToBuildAzurePackage.cmd. It fails all the time!! It's not working at all! Next, I downloaded the source codes package (Orchard.Web.1.2.41.zip) and tried to open the Orchard.Azure solution, build, and

Orchard Performance on Azure

强颜欢笑 提交于 2019-11-30 09:50:07
Using http://docs.orchardproject.net/Documentation/Deploying-Orchard-to-Windows-Azure I've successfully deployed Orchard into Azure. After every 20mins or so without activity (app pool recycle?) it takes minutes to render a page. I'm running on an Extra Small instance in Azure. Webinstance, Storage and SQL Database are all in the same datacentre - SE Asia. There is a module called keepalive, which does a regular ping. or http://blog.smarx.com/posts/controlling-application-pool-idle-timeouts-in-windows-azure Also turned off Debug(!) and put in full trust as described here http://docs

Using jQuery from Orchard module page

情到浓时终转凉″ 提交于 2019-11-30 06:54:01
I'm trying to modify the Orchard.Search part with the search form and button to look and behave as I want. For this I need to use some jQuery features. I added this to the header of the Search.SearchForm.cshtml file: Script.Require("jQuery"); and I can see from the output of the page that jquery is added, at the bottom of the html, just before the ending tag: <script src="/Orchard.Web/Modules/Orchard.jQuery/scripts/jquery-1.4.2.js" type="text/javascript"></script> which looks fine. That's where the jQuery library is and I can download it from that location without probs. I've also added a

How to use javascript(js file) in Orchard CMS

爷,独闯天下 提交于 2019-11-30 03:24:26
Can any one tell me please how to use js file in Orchard CMS? I added it to Layout.cshtml page as Script.include("jquery.js") . Piotr Szmyd You can do it twofold. First approach is just like mdm described : Create your own implementation of IResourceManifestProvider interface (take a look at Orchard source - it's been implemented in many modules), implement BuildManifests(ResourceManifestBuilder builder) method and create a named resource for a given .js file Use @{ Script.Require("[your resource name]"); } in your Razor view file (.cshtml) to include that script. This is a preferred solution

How to skip displaying a content item in Orchard CMS?

只谈情不闲聊 提交于 2019-11-29 16:57:43
I have a content part that provides a begin timestamp and end timestamp option. These 2 fields are used to define a period of time in which the content item should be displayed. I now have difficulties to implement a skip approach whereas content items should not be displayed / skipped when the period of time does not span the current time. Digging in the source code and trying to find an entry point for my approach resulted in the following content handler public class SkipContentHandler : Orchard.ContentManagement.Handlers.ContentHandler { protected override void BuildDisplayShape(Orchard

How to deploy Orchard CMS in Windows Azure?

折月煮酒 提交于 2019-11-29 14:54:21
问题 Experts, Is there any of you guys who has successfully built and deployed Orchard CMS (1.1 and above) in Azure? I've tried to build the source codes (pulled from Codeplex repo) as suggested here: http://www.orchardproject.net/docs/Deploying-Orchard-to-Windows-Azure.ashx but keep on failing. If you see the comments of that article, you'll see some people are having the same problem with the ClickToBuildAzurePackage.cmd. It fails all the time!! It's not working at all! Next, I downloaded the

How to locate resources in Orchard

落花浮王杯 提交于 2019-11-29 10:43:40
I am writing an Orchard theme, and I'd like to be able to locate some of the resources packaged with the theme (images/swfs etc). What is the best way of doing this? I've had a look at ResourceManifest files, using builder.Add.DefineResource but I can't seem to find it's counterpart in the view. Or do I just put the full path in? Any hints? Cheers Carl In stylesheets, relative paths (from the stylesheet path) should be used. In views, you should use Url.Content. If you need to define the new resource (script or stylesheet): Create a class inheriting IResourceManifestProvider Provide the void

Scheduled tasks using Orchard CMS

…衆ロ難τιáo~ 提交于 2019-11-29 08:17:50
I need to create scheduled task using Orchard CMS. I have a service method (let's say it loads some data from external source), and I need to execute it everyday at 8:00 AM. I figured out I have to use IScheduledTaskHandler and IScheduledTaskManager... Does anyone know how to solve this problem? Some sample code will be appriciated. In your IScheduledTaskHandler, you have to implement Process to provide your task implementation (I Advise you to put your implementation in another service class), and you have to register your task in the task manager. Once in the Handler constructor to register

Using jQuery from Orchard module page

丶灬走出姿态 提交于 2019-11-29 07:42:27
问题 I'm trying to modify the Orchard.Search part with the search form and button to look and behave as I want. For this I need to use some jQuery features. I added this to the header of the Search.SearchForm.cshtml file: Script.Require("jQuery"); and I can see from the output of the page that jquery is added, at the bottom of the html, just before the ending tag: <script src="/Orchard.Web/Modules/Orchard.jQuery/scripts/jquery-1.4.2.js" type="text/javascript"></script> which looks fine. That's