orchardcms

Is there a way to change the zone of the LogOn and NotFound view

為{幸葍}努か 提交于 2019-12-24 21:09:19
问题 I have created a custom version of the LogOn and NotFound views for a custom theme, is it possible to change the zone they render in? I've tried putting <Place LogOn="MobileContent:1"/> into the placement.info file to no avail. 回答1: LogOn renders into Content, I don't think you can change this via placement. Why do want this to render somewhere else? Are you looking to have other content displayed with the logon form alongside it? You will need to create a widget for that. I made a little

Error Creating Custom ContentPart Orchard CMS

故事扮演 提交于 2019-12-24 18:13:07
问题 I am getting the error "The model item passed into the dictionary is of type 'Orchard.UI.Zones.ZoneHolding', but this dictionary requires a model item of type'First.Module.Models.PersonListPart'" , when entering the editor page for the content in the admin dashboard. My content driver looks like: public class PersonListPartDriver : ContentPartDriver<PersonListPart> { protected override DriverResult Display( PersonListPart part, string displayType, dynamic shapeHelper) { return ContentShape(

Email configuration troubleshooting in localhost website

别来无恙 提交于 2019-12-24 11:54:47
问题 I simply added the following SMTP details: What's wrong with my configuration then? Why is that I can't receive any new emails on my gmail account. Please help me with these. Thank you. 回答1: I recently came across this issue. Specifically for Gmail I had go to my Google Account Settings and first enable 2-Step Verification. Once that was enabled I could create 'App Passwords'. This creates a custom password for login and bypasses the 2-step verification. Copy and paste that in your password

Orchard Rename Content Type in Migration

陌路散爱 提交于 2019-12-24 09:23:57
问题 I'm hoping to rename an existing custom content type in one of my Orchard modules. Is it possible to do this in a migration? 回答1: Yes, but not by using ContentDefinitionManager . The simplest way would be to execute an SQL update query against Settings_ContentTypeDefinitionRecord table using SchemaBuilder.ExecuteSql . 来源: https://stackoverflow.com/questions/27956273/orchard-rename-content-type-in-migration

Orchard - Wrappers for Fields

房东的猫 提交于 2019-12-24 08:18:21
问题 I'm trying to use a wrapper view for fields in a custom form but when I do the wrapper content shows up fine but I lose my field. I've looked over this tutorial on placement and I'm trying to use the wrapper functionality to get separators into my custom form to break up the questions but it's not working. For example I've got a question on my form that asks for Name. in my placement file I have the following <!-- content:2.[section].[questionNumber] --> <Place Fields_Common_Text_Edit-Name=

How to register custom build Autofac.Module in Orchard?

北城余情 提交于 2019-12-24 07:04:02
问题 I have a piece of code that encapsulates functionality that isn't specific to Orchard. However i need to make it available in Orchard via dependency injection. So, I built up an Autofac Module that registers all components (types), but I can't find a way to inform Orchard's Autofac Container about it. From what i red, there are two ways to add a module to a container: By supplying the module at to the ContainerBuilder (usually at start-up), Or by updating the already built Container at

Is Orchard.ContentManagement.ContentPart implemented with Clay?

半世苍凉 提交于 2019-12-24 07:03:10
问题 I previously asked How do we check whether a dynamic clay object has a property? My question assumed that an Orchard.ContentManagement.ContentPart was a dynamic Clay object. Is it a dynamic Clay object? 回答1: No. It used to be the case, but it was recently removed, and replaced with several more specialized, and faster implementations of dynamic. The Clay dependency is completely gone. 来源: https://stackoverflow.com/questions/25166799/is-orchard-contentmanagement-contentpart-implemented-with

How to add C# code to a new Orchard CMS theme

天涯浪子 提交于 2019-12-24 05:52:19
问题 Introduce the Problem I would like to implement the Orchard IShapeTableProvider, in order to add an alternate for the main List shape. I have done the following: Download Orchard.Source.1.8.zip, build in VS 2013, and create a new theme via code generation: orchard.exe feature enable Orchard.CodeGeneration codegen theme My.FirstTheme theme enable My.FirstTheme Add the following code to my theme in the Themes > My.FirstTheme > Code > ListShapeProvider.cs file. namespace Themes.My.FirstTheme

How to add C# code to a new Orchard CMS theme

霸气de小男生 提交于 2019-12-24 05:52:01
问题 Introduce the Problem I would like to implement the Orchard IShapeTableProvider, in order to add an alternate for the main List shape. I have done the following: Download Orchard.Source.1.8.zip, build in VS 2013, and create a new theme via code generation: orchard.exe feature enable Orchard.CodeGeneration codegen theme My.FirstTheme theme enable My.FirstTheme Add the following code to my theme in the Themes > My.FirstTheme > Code > ListShapeProvider.cs file. namespace Themes.My.FirstTheme

AttributeRouting - Method to get routes in assembly

喜你入骨 提交于 2019-12-24 04:42:09
问题 I want to use AttributeRouting with Orchard CMS. To do so I need to implement an IRouteProvider with a method that returns an list of Orchard RouteDescriptor s. I need a way to get the routes list so I can do something like this: public IEnumerable<RouteDescriptor> GetRoutes() { return _routes ?? (_routes = MvcRouting.GetRoutes(GetType().Assembly).Select(route => new RouteDescriptor { ... }).ToArray()); } This method is from MvcRouting but I want to use the more feature rich AttributeRouting