orchardcms

Return JsonNet type JSON from WebAPI in Orchard

旧巷老猫 提交于 2019-12-13 05:58:02
问题 In standard MVC I use JsonNet to return JSON that is in camelCase and sucessfully serializes entities that have related entities (which otherwise reports a "cycles" error" using the default serializer). I'd like to do the same for a WebAPI controller in an Orchard module. By default it returns PascalCase JSON and reports a "cyles" exception when given a list of entities. Can anyone explain how best to configure the JSON output from within the Orchard module, to mimic what JsonNet would

Orchard CMS Query Raw Layout Level Access To Properties

人盡茶涼 提交于 2019-12-13 05:43:07
问题 I think this is because I don't know how replacement tokens work. Another example problem is up one level on the edit Layout, I want to set the item class to work-item {Category}, Category being the name/title of a property, which I am using for grouping. Right above the projection: I want to include some html that lists all the Categorys in a ul i.e. data-filter=".experiential" I have tried things like: work-item {Category} and work-item {Content.Fields.CaseStudy.Category}. Category is a

How to Create Startup Page Custom module .cshtml in Orchard

﹥>﹥吖頭↗ 提交于 2019-12-13 05:07:34
问题 I am using Orchard 1.7 and I want to make start page from my custom module. I've created a module with name MYMODULE and under it's view folder I have *.cshtml with name Index. I want to set Index page as a startup page of my site. It means first page will be Index.cshtml from MYMODULE. Is it Possible? Please help me. 回答1: Enable the aliasUI feature in Modules section Add a blank route that points to /MyModule/MyController and it should work. May have to delete the current homepage url. And

Orchard CMS custom widget view

雨燕双飞 提交于 2019-12-13 04:42:20
问题 I'm writing module for Orchard CMS, and I need to display elements of my content type in widget. Drivers/FilesWidgetDriver.cs: public class FilesWidgetPartDriver : ContentPartDriver<FilesWidgetPart> { private readonly IFileService _fileService; public FilesWidgetPartDriver(IFileService fileService) { _fileService = fileService; } protected override DriverResult Display(FilesWidgetPart part, string displayType, dynamic shapeHelper) { return ContentShape("Parts_FilesWidget", () => shapeHelper

Detailed documentation about mapping a web templete inside Orchard CMS [closed]

妖精的绣舞 提交于 2019-12-13 04:32:03
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I found a web template on the net link and I want to allow end-users to edit the website using CMS. I found Orchad CMS, which is based on ASP.Net MVC. But the problem I'm facing is that I didn't find the full documentation on how I can map a web template similar to the one I provide to be managed inside a CMS

Windows Platform Installer fails during Orchard installation

懵懂的女人 提交于 2019-12-13 03:42:52
问题 I'm attempting to install Orchard 1.0 on a Windows 7 box. It has only just been released. I downloaded and installed the Windows Platform Installer and attempted to install Orchard. The error message is that the application has stopped working and asks if I want to debug or close the application. The event log contains a single error: The event logging service encountered an error while processing an incoming event published from Microsoft-Windows-Security-Auditing. I tried installing MVC3

How do I store a comma-separated list in Orchard CMS?

北慕城南 提交于 2019-12-13 02:56:33
问题 Using Orchard CMS, I am dealing with a record and a part proxy, but cannot figure out how to save it into the DB. In fact, I confess I don't even know how to get the items I'm trying to save into this paradigm. I was originally using enum 's for choices: MyEmum.cs : public enum Choices { Choice1, Choice2, Choice3, Choice4 } MyRecord.cs : public virtual string MyProperty { get; set; } MyPart.cs : public IEnumerable<string> MyProperty { get { if (String.IsNullOrWhiteSpace(Record.MyProperty))

How to disable build-in orchard controller action

六眼飞鱼酱① 提交于 2019-12-13 02:23:01
问题 I would like to know, is there a way to disable a controller action from the Orchard framework? I have created a custom registration controller and I would like to override the built-in /Users/Account/Register action. I don't know how to solve this issue; there are route registrations within the framework, maybe I could override the routes somehow? 回答1: There are two routes. 1) Implement your own controller and supress the original Accounts Controller (substituting the namespace listed below

Using Orchard.Forms on the front-end with code only

半城伤御伤魂 提交于 2019-12-12 17:04:39
问题 I am using code to create a form using Orchard.Forms. This is the code I have: public void Describe(DescribeContext context) { Func<IShapeFactory, object> form = shape => { var f = Shape.Form( Id: "MyLayoutBasicInformation", _BasicInformation: Shape.Fieldset( Title: T("Basic Information"), _FirstName: Shape.TextBox( Id: "FirstName", Name: "First Name", Title: T("First Name"), Description: T("The name for this field") ) ) ); return f; }; context.Form("MyLayoutBasicInformation", form); } Most

What's the recommended approach for hierarchical URLs in Orchard?

☆樱花仙子☆ 提交于 2019-12-12 15:38:41
问题 I'd like to have a hierarchical URL structure in my site. Something on these lines: tutorials javascript jquery There should be a page at each level ( tutorials , tutorials/javascript and tutorials/javascript/jquery ). Obviously, using Taxonomies would help me organize my content in this manner, but how do I get Autoroute URLs generated for this scenario? Bertrand Le Roy made a comment on this SO answer about using taxonomy terms as pages but it still doesn't seem to create the right URL