orchardcms-1.6

Orchard connected parts

与世无争的帅哥 提交于 2020-01-06 13:52:33
问题 I have a complex scenario that I'm trying to model using Orchard CMS parts. Now here it is the simplified version to make clear my question. I have a part name, as example, PersonPart that has just one property: Name. I have another part that contains the person role, name it PersonRolePart and has just one property, Role In Orchard I have created all the appropriate plumbing (Handlers, Drivers, Views...) In migrations I created a new content type named Person that contains the two parts.

Display text when button clicked

独自空忆成欢 提交于 2020-01-05 08:13:29
问题 Creating my first ASP.NET MVC Knockout MVC. I've added a model setting 3 dates. The controller assigns 3 dates. Then they are displayed on screen using the view: <p>First Date: @ko.Html.TextBox(m => m.FirstDate)</p> <p>Second Date: @ko.Html.TextBox(m => m.SecondDate)</p> <p>Third Date: @ko.Html.TextBox(m => m.ThirdDate)</p> @ko.Apply(Model) The @ko.Apply(Model) being the main part which displays the 3 dates. I am trying to only show the 3 dates when a button is clicked, so iv put the code

Display text when button clicked

夙愿已清 提交于 2020-01-05 08:13:06
问题 Creating my first ASP.NET MVC Knockout MVC. I've added a model setting 3 dates. The controller assigns 3 dates. Then they are displayed on screen using the view: <p>First Date: @ko.Html.TextBox(m => m.FirstDate)</p> <p>Second Date: @ko.Html.TextBox(m => m.SecondDate)</p> <p>Third Date: @ko.Html.TextBox(m => m.ThirdDate)</p> @ko.Apply(Model) The @ko.Apply(Model) being the main part which displays the 3 dates. I am trying to only show the 3 dates when a button is clicked, so iv put the code

reset password with orchard not updating

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-05 04:52:08
问题 Using Orchard 1.6. In the settings section in the Dashboard I have enabled 'Display a link to enable users to reset their password' After updating this feature on the server the user can now request a lost password email be sent to them which allows them to change their password. This all works fine however the new password does not take affect. and the old password still works? why is this? thanks for any replies 回答1: I just had this issue. I am using Orchard 1.7. The problems seem to come

How to control the rendering of a menu in Orchard

 ̄綄美尐妖づ 提交于 2020-01-03 17:06:09
问题 I have the following problem: I'm making a site in Orchard and have to apply a design made by some design company. They delivered html and CSS (+ LESS) and I have to make it into a theme. I get it done for the most part except the menu's. I want to apply a class to the nav tag in the following code, but I can't make any alternates for that end up rendering it. <article class="widget-navigation widget-menu-widget widget" shape-id="18"> <nav shape-id="19"> <ul class="menu menu-main-menu" shape

Custom part properties missing in export Orchard 1.6

帅比萌擦擦* 提交于 2020-01-03 10:46:09
问题 I have a problem with the import export module in Orchard 1.6: I want to export a custom type with a part that has a property in it. The export XML contains data from TitlePart, CommonPart, BodyPart and AutoroutePart, however the data from my own part is not there. Is there anything I should do like implementing an interface or overriding something on my part so that it is contained within the export XML? What are (if any) the extension points of the export module? I have the source of the

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

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=

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

Orchard Migration Add_Index to an existing table to make it a unique constraint

大兔子大兔子 提交于 2019-12-24 00:25:05
问题 Looking at Q A migration to add unique constraint to a combination of columns In my migration file I already have a 'MobileDeviceRecord' table with an 'ActivationCode' which is created in code from a GUID class when a new record is created. I want to ensure the new 'ActivationCode' is unique to the existing 'ActivationCodes' in the table. Do I need to remove the 'ActivationCode' column and re-add it with a constraint or can I use an add_index...Also what is the proper way to use it?? public