orchard-modules

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

Communication between Custom Modules in Orchard CMS

佐手、 提交于 2019-12-23 04:26:36
问题 I'm a newbie to Orchard CMS. My problem is that I have created a couple of custom modules on my Orchard site, but am so far unable to raise events and communicate between these modules. From what I’ve read, the EventBus Pattern and IEventHandler is the best way to go about this, but am having difficulty implementing it, as so far I’ve been unable to find any substantial information in this area online. If anyone know's of any comprehensive tutorials or can point me in the right direction on

Orchard Shape Wrapper

只谈情不闲聊 提交于 2019-12-12 03:23:28
问题 I'm following the Orchard documentation on Wrappers but couldn't wrap my head around it. http://docs.orchardproject.net/Documentation/Understanding-placement-info#Wrapper According to the documentation, we were to create Wrapper.HtmlContent.cshtml and insert the following in it. <div class="htmlWrapperContent"> @Model.Html </div> But what is Model.Html ? Is it a Shape ? I know Model is the Shape itself. Html is not a built-in property of Shape or IShape so I figure it must be some custom

How to get the Query preview list in code | Orchard 1.7

↘锁芯ラ 提交于 2019-12-11 09:40:02
问题 There is a Custom Content Type "SideBarLinks" in CMS. I created a query to get the list of items of this type: "SideBarLinks" and specified sort and filter criteria as well. This works fine when Previewing the query results in CMS. Is there a way i can get the same list in code, say in the Action method of any Controller ? Which Class/Services of Orchard is there to query ? And how to perform all those filtering, sorting of the Query results in a Controller method ? So far I used to query