orchardcms

How to add an ASP.NET MVC sub-application under Orchard CMS in IIS7?

99封情书 提交于 2019-12-11 06:39:38
问题 I have created an orchard cms blog with a url like www.testurl.com I would like to have another sub site at the address www.testurl.com/subsite I have added the application in IIS7 and the orchard blog works fine but when I try to access the URL: www.testurl.com/subsite I get the following error: Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code

Reusing Orchard's Core to build another extensibility framework

℡╲_俬逩灬. 提交于 2019-12-11 06:22:13
问题 I am very keen to hear opinions on this. We are building an extensible architecture for web applications. We have a core team that builds the default product. Other dev teams take the default product and want to override/replace/extend its functionality at the code level. We are considering using Orchard's Core to achieve this. If we did it would probably consist of: Removing everything CMS related from Orchard Stripping out Orchard's database Using/building on Orchard's core DLLs to create

How can I eager fetch content of custom types in a ContentManager query?

半世苍凉 提交于 2019-12-11 05:17:58
问题 I'm running into some n+1 performance issues when iterating over a collection of ContentItems of a custom Type that I created solely through migrations. ContentDefinitionManager.AlterPartDefinition("MyType", part => part .WithField("MyField", field => field ... ) ); ContentDefinitionManager.AlterTypeDefinition("MyType", type => type .WithPart("MyType") ); Every time I access a field of this part a new query is performed. I can use QueryHints to avoid this for the predefined parts var myItems

How can I manually save an Orchard.Forms field?

女生的网名这么多〃 提交于 2019-12-11 04:45:52
问题 With the following code I am able to manually create a field using Orchard.Forms and display it in a view. Here is the code (relevant only): MyLayoutForm.cs : .... public void Describe(DescribeContext context) { Func<IShapeFactory, object> myInformation = shape => { var f = Shape.Form( Id: "MyBasicInformation", BasicInformation: Shape.Fieldset( Title: T("Basic Information"), FirstName: Shape.TextBox( Id: "FirstName", Name: "First Name", Title: T("First Name"), Description: T("The name for

How to use lucene query syntax on Orchard CMS

浪尽此生 提交于 2019-12-11 04:38:49
问题 I would like to use the full Lucene query syntax on an Orchard CMS based Website. Currently, after enabling the indexing and search on Orchard, I can search on the website according to the fields I selected on the Orchard search administration page, but I cannot perform one search on a particular field only (without changing the behavior on the entire search) I cannot use fuzzy search... From the logs, I can see that Orchard take care of that part (providing Lucene a good query syntax), but I

Orchard 1.8 Unable to hide metadata (published date) from custom part using Placement.info

≯℡__Kan透↙ 提交于 2019-12-11 03:52:22
问题 I have a Placement.info at the root of my custom part folder. <Placement> <Place Parts_Common_Metadata="-" /> <Place Parts_MyCustomPart="Content:2" /> </Placement> MyCustomPart displays fine. However, this doesn't hide the metadata. Using Shape Tracing, I managed to identify which Placement.info file was being loaded/processed that displays the metadata. It is ~/Core/Common/Placement.info containing the rule <Placement> <Match DisplayType="Detail"> <!-- Removed for brevity --> <Place Parts

Is it possible to create an orchard autoroute using contents of a custom type property?

谁都会走 提交于 2019-12-11 03:51:36
问题 I have an Orchard cms module with some additional Content types set up and have added an AutoRoute component via code. Everything works perfectly, however I am not happy with the default permalink pattern. What I am trying to do is add a custom pattern and use one of the public properties in my content type. In my case the custom type has a public property called ClubName and I would like that to be used (It makes more sense from a routing perspective). The Orchard part class name is called

Add a MediaPicker to the General Site Settings

ぐ巨炮叔叔 提交于 2019-12-11 03:36:45
问题 The current project I'm on is utilizing tenant sites. With each site, we want the ability to change the logo through out the tenant site by modifying the its settings (on the admin page, settings > general). I've added two text fields to the site settings by following this well documented tutorial. However, I'd like the user to be able to pick the logos using the media picker instead of typing in the path. Currently I have a LogoBarSettings part with its record, driver and handler. I'm not

RegisterClientScriptResource NullReferenceException in a Child IIS Application

烂漫一生 提交于 2019-12-11 03:32:27
问题 I upgraded from .Net 4.5 Beta to the RTM version, and now when I have a standard WebForm page where I had a generic <asp:RequiredFieldValidator /> tag I get a NullReferenceException that looks like this: [NullReferenceException: Object reference not set to an instance of an object.] System.Web.UI.WebControls.ValidatorCompatibilityHelper.RegisterClientScriptResource(Control control, String resourceName) +180 System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +253 System.Web.UI

Orchard - Hide “Set as home page” checkbox on admin side

淺唱寂寞╮ 提交于 2019-12-11 02:41:56
问题 is it possible to somehow hide "Set as home page" checkbox when adding new content in Orchard (without removing Autoroute part)? Thank you, Jakub 回答1: Autoroute exposes a permission "Set Home Page". You can revoke this permission for user roles whom you don't want to show the checkbox. 来源: https://stackoverflow.com/questions/15918425/orchard-hide-set-as-home-page-checkbox-on-admin-side