orchardcms

Orchard Themed Attribute outside controllers

大憨熊 提交于 2019-12-02 11:02:44
问题 I have a service which will override the content of the response body. is it possible to use themed within the method which override the content ? [Themed] public void forbiddenAlert(IHttpContextAccessor Hca) { // overriding response body } 回答1: No, i don't think this will work as the Themed attribute is intended for decorating a controller only. Also i don't think you follow the right approach for denying access. The event handler should not override the response body (seperation of concerns

Orchard Custom Form DropDownLists

只谈情不闲聊 提交于 2019-12-01 20:10:35
问题 After a bit of playing around with Orchards' Custom Forms module, i decided i wanted to use a dropdownlist to select a particular person with their email as the value for that selected option. While i was creating the form i couldn't see anyway you could set values to your options. See below image for example: Don't suppose anybody has come across this before or has a suggestion? 回答1: In your case I wouldn't worry about having different text and values for the fields. It's also potentially

Using FindView in Orchard

跟風遠走 提交于 2019-12-01 19:23:51
I'm trying to use: var viewEngineResult = ViewEngines.Engines.FindView(ControllerContext, myViewName, null); as part of a process to render the contents of a view to send nice formatted emails. I'm using it inside an Orchard Controller. I have used similar code outside of Orchard in an MVC project and it works fine. However in Orchard running this code fails to find the view I'm looking for and returns a view engine result that has searched 0 locations. viewEngineResult has the following values after it is called: SearchedLocations: Count = 0, View: null, ViewEngine: null Is there a reason

How to access overall AutoFac container to register a dependency in Orchard?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 17:45:12
问题 the question is pretty straightforward.i want to access overall AutoFac container so that i can register my dependency in it. remark: i am not OK with inheriting from IDependency cause in my project it results in a circular referencing (of two assemblies).what i wanna do is register a component with a Key and access it with same Key in other assembly. thanks in advance. EDIT: i have found a class called DefaultOrchardHostContainer in the core ,but it only exposes Resolve<> method but not

Using windows authentication with Azure WebApp/Website

。_饼干妹妹 提交于 2019-12-01 17:44:29
问题 We have an Active Directory domain sitting on a networked Azure VM and have a separate Azure WebApp/Website that is running Orchard CMS on the same virtual network. Do webapps support windows authentication for connecting to Active Directory? If so, how do I go about setting it up in IIS? 回答1: No, it's not possible. In order to have Windows Authentication is something for on-premise deployments. For Azure Web Sites Azure Active Directory is clearly the best option. Sync from AD to Azure

Edit link arround the contents missing

北城以北 提交于 2019-12-01 15:28:29
I am new to orchard CMS. I have downloaded the source code from http://orchardproject.net/ . I am not able to find the Edit link around the contents as in the screen shots provided. I have worked on Sitecore and now I am in process to find new Open source CMS for my client. Is this link provide me an inline editor? I would like to explore more. You need to enable the Content Control Wrapper and/or Widget Control Wrapper features in "Modules" screen. Since 1.4 those features are optional. Regarding the "inline" editor question - no, there's currently no inline editing feature in Orchard.

Edit link arround the contents missing

大城市里の小女人 提交于 2019-12-01 14:26:32
问题 I am new to orchard CMS. I have downloaded the source code from http://orchardproject.net/ . I am not able to find the Edit link around the contents as in the screen shots provided. I have worked on Sitecore and now I am in process to find new Open source CMS for my client. Is this link provide me an inline editor? I would like to explore more. 回答1: You need to enable the Content Control Wrapper and/or Widget Control Wrapper features in "Modules" screen. Since 1.4 those features are optional.

Customizing the Orchard navigation menu

我只是一个虾纸丫 提交于 2019-12-01 12:03:22
Excuse me for asking such a general question. I'm creating a website with Orchard CMS. The website's design and interactivity are critical requirements. I have a navigation menu which has a fixed size(900 px wide), but should be able to adjust as many menu items as possible (I do this manually by modifying the css). I've used a bit of jQuery to create some animations on mouse hovers etc. for the menu. Problem is that the css and jQuery parameters are hard coded. So if a user were to change to add a new menu item, they need to know in advance the number of menu items, and sub items, thus it's

What is the Work<> class for in Orchard CMS?

穿精又带淫゛_ 提交于 2019-12-01 10:43:49
Plain and simple, what is the use case of the Orchard.Environment.Work<> class defined in Orchard\Environment\WorkContextModule.cs ? It can be found in several places like private readonly Work<IContainerService> _containerService; public Shapes(Work<IContainerService> containerService) { _containerService = containerService; ... Is it for delayed resolution of IContainerService ? The Work class is for lazy loading dependency injection. The dependency is not resolved when instantiating the class, but only when calling the Value property: private readonly IMyService _myService; private readonly

How to dynamically add a content part in a Orchard content handler?

こ雲淡風輕ζ 提交于 2019-12-01 10:13:08
问题 I have an Orchard content handler that calls Filters.Add(new Orchard.ContentManagement.Handlers.ActivatingFilter<MyPart>("User")); in its constructor to weld MyPart to a user content item. How can i weld MyPart based on the content item id? The issue here is that the content item is not yet created when the constructor is called. I tried hooking into the life cycle with overriding Activating() but that doesn't work either as the content item is also not created yet. 回答1: Okay, this task is