Orchardcms Orchard CMS Module Install with IISExpress Fails because of permissions

I keep getting the "There was an error installing the requested package. This can happen if the server does not have write access to the '~/Modules' or '~/Themes' folder of the web site. If the site is running in shared hosted environement, adding write access to these folders sometimes needs to be done manually through the Hoster control panel. Once Themes and Modules have been installed, it is recommended to remove write access to these folders." message when trying to install a module from th

Orchardcms Override Detail template for a Content Type with url alternate in Orchard CMS

Does anyone know if it's possible to override the DisplayType template for a ContentType using the an url alternate template? For example, is it possible to override the template: Content-Page.Detail.cshtml with Content-url-homepage-Page.Detail.cshtml? After playing around a bit, it does not seem so. Does anyone know if what I'm trying to achive is possible? Thanks!

Orchardcms Building a list of downloadable items in Orchard 1.6

I'm fairly new to Orchard and I'm wondering about the "best" way of building a basic list of documents with a download link? Say the scenario is this, I want to make a list of newsletters, the news letter are in PDF format and the users should be able to download then straight from the list view. An admin, should easily be able to add a new newsletter and it should turn up in the list. My current train of thought is to, all through the dashboard, create a content type "Newsletter" with a ti

Orchardcms Orchard promoting from TEST to PROD

I have 3 environments currently: DEV (with VS2012 and source code) - which connects to TEST db TEST - which connects to TEST db PROD - which connects to PROD db The website is currently working fine on DEV and TEST (with Contents, Widgets, etc added already). When I tried to promote to PROD, the website seems to work fine (all pages there, I can navigate, etc) - However, I cannot edit at all. For example when adding new page/editing content I would get this error: "An unhandled exception

Orchardcms Orchard CMS build script - excluded module projects included in build

I'm using Orchard 1.6 and have a question regarding the build batch file. When run, the script builds every module within the "Modules" directory, regardless of whether the module project is included in the VS solution. Is there a setting somewhere so only module projects are built if the corresponding project is loaded in VS? (I'd like to prevent excluded/unloaded projects from being part of the build) Thank you for any pointers.

Orchardcms Advanced Orchard Theming - Object Model vs Placement.info?

I have been tasked with converting a design heavy, fairly advanced HTML template for a site into an Orchard theme and I am struggling with the best way to accomplish certain things. The theme is built on bootstrap and is a modern responsive HTML template like you might find on ThemeForest or something. The site will have a number of content types (staff members, portfolio items, partners, etc.) and will need a number of templates. The content types will have a large number of fields (upwards

Orchardcms How to change orchard blog home page list view/summary view

I have Orchard 1.7 setup with blog recipe. The home screen display a list of blog posts. I want to override the way the content is displayed in summary view. I could do this for each parts. But my styling is such that I need to wrap title, body, and meta tags with a special div when ever the display type is summary. The problem is: After shape tracing I understood that the template used in the home page (summary) is same as the detailed one. Content.cshtml For detail view I want to use

Orchardcms Orchard Multi-Tenancy Setup/Configuration

I am starting to play with Orchard's multi-tenancy options to enable a single codebase to host dozens of websites (perhaps over a hundred in the future). The pieces I'm unclear on with this are: Is it possible to call one or more API endpoints to dynamically create these sites from code on my end? Meaning, we have an existing codebase (non-Orchard) in .Net so what API(s) would I call to create these sites on the fly without having to login and do it manually? In conjunction with #1, are there

Orchardcms Updateing image field fails for any user except super user in Orchard CMS

I installed ImageField and used it to create News widget , SlideShow widget and ... When I try to change the picture and publish changes for any item containing ImageField , if the super user is logged in, all changes saves successfully. But if any other user with any role is logged in then the changed picture name does not save in database but all other field like text and date and ... stores successfully. Thank you in advance for your help...!

Orchardcms Retrieving latest version of content item with related records immediately after creating it

I'm building a module where the data has a parent child relationship. I've created a service with a method to create new parent records along with their children. The method looks something like this: public ParentPart CreateParent(...) // Create parent content item var parentPart = _contentManager.New("Parent").As<ParentPart>(); parentPart.PropertyA = "value..."; _contentManager.Create(parentPart); // Create child var childRecord = new ChildRecord { ChildPropertyA = "va

Orchardcms Orchard CMS ContentShapes - can I add a wrapper?

I have a resource in OrchardCMS that I'm displaying through a number of smaller shapes (so that I can adjust the layout order in placement.info). In the Driver I am returning these parts through the use of returning a Combined(ContentShape(...), ContentShape(...), ContentShape(...)) etc However I would like the HTML of each of the smaller shapes to appear within an HTML wrapper (such as a div or article or suchlike) How do I go about doing this? Thanks

Orchardcms Orchard Set Up Authentication

I've been wrestling with getting Orchard 1.9.2 installed and running in a dev environment as well as in Azure. Set up fails with "Object reference not set to an instance of an object" almost immediately after clicking the "Finish Setup" button. I tracked it down to not being able to connect to the database - _session.Connection is null. SQL Profiler clued me in that SQL Auth was not enabled on my SQL Server, so I tried enabling it and creating a new user. Lo and behold, Orchard started workin

Orchardcms How to efficiently return multiple DriverResults from the Display method?

This article describes how to write efficient DisplayDrivers for your Parts so that expensive code is only executed when the shape is actually displayed. protected override DriverResult Display(MyPart part, string displayType, dynamic shapeHelper) { // return the shape return ContentShape("Parts_MyPart", () => { // do computations here return shapeHelper.Parts_MyPart(); }); } Now I'd like to make a Part that returns multiple DriverResults using the Combine metho

Orchardcms Load catalogs from external DB and link them to ContentParts as ContentRecords

Example: I have a countries catalog stored in another DB and I need to use it as a property in some ContentParts. I'm trying to make the connection without interfering much with Orchard wiring. public class MoviePart : ContentPart<MoviePartRecord> { public IEnumerable<CountryRecord> Countries { get { return Record.Countries.Select(r => r.CountryRecord); } } } The relation between CountryRecords and MovieParts will be on the Orchar

Orchardcms Orchard CMS 1.4: Adding a Text Field to Custom ContentPart

In the module for a custom ContentPart, how do I set a field to be a Text field? In my migrations.cs class, I have created the table for the part: public int UpdateFrom1() { SchemaBuilder.CreateTable("RightContentPartRecord", table => table.ContentPartRecord() .Column<string>("Html")); return 2; } So, I have a column called Html. I want to use the WYSIWY

Orchardcms Orchard Cannot access to media file - access is denied

I'm trying to insert picture in Orchard amdin page, but I get an error An unhandled exception has occurred and the request was terminated. Please refresh the page. If the error persists, go back The folder could not be created at path: . System.UnauthorizedAccessException: Access to the path 'D:\Projects\MySite.Web\Media\Default' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object

Orchardcms Orchard custom field not getting posted correctly

I have created a custom field in Orchard which is meant to just contain one field (GUID). So whenever it is added to a content type, it would show a new GUID in "Editor" template. This works fine, except when I submit the form which contains the content type, the form gets posted with a different GUID. On looking closely, I found the driver of the field for Editor (POST) does not updates the viewModel for the field. Any suggestion or tips to debug ? Here are some lines of my code protected ov

Orchardcms Orchard CMS - Sudden 404 during development

I was getting close to completing my first site using Orchard CMS, and when I went to enable the 'blog' module I saw an error page. I wish I had paid more attention to it, instead I closed it and restarted my site. Now, I get 404 errors and I can access the front or back end of my site. I'm at a loss. I found these in the error logs but I really don't know where to go from here... 2014-01-01 19:58:09,140 [11] Orchard.Environment.DefaultOrchardHost - A tenant could not be started: Default Auto

Orchardcms How can I simulate content type inheritance in Orchard?

I've been asked to create several content types that similar, and some that are the same. For example: Tutorial & Video Tutorial, they're almost the same, but the Video Tutorial has the video id. Another example: How To Article, Overview Article, etc ... they're all exactly the same (for now anyway), so I'd like to create a single Article type, and basically 'inherit' it somehow. Can I create an 'IS A' relationship between different types? Am I asking the wrong question and I should be d

Orchardcms Handling WCF services in orchard and integration with orchard notification

Here is my case, I wrote a wcf and it is working with orchard perfectly. I'm going to handle events messages such as warnings and exceptions so I add a ServiceAdapter and ClientServiceLocator to my project : ServiceAdapter: public class ServiceAdapter<TService> where TService : class, IContract { public TResult Execute<TResult>(Func<TService, TResult> command) where TResult : IDtoResponseEnvelop { try { var dispatcher = ClientServi

Orchardcms Orchard ContentPart OnCreating Event

I'm writing a custom ContentHandler for a custom ContentPart. I was trying to use the OnCreating lifecycle event to set a value on my ContentPart before the new record was inserted into the database, but it appears that the record is created prior to my event handler being called. public class MyPartHandler: ContentHandler { public MyPartHandler( IClock clock, IRepository<MyPartRecord> repository) { this.Filters.Add(StorageFilter.For(repository));

Orchardcms How do you access the position of an Orchard content item in a list from a part driver Display method?

I have a content part that's included on a content type which is often displayed in a list. I'd like to access the position in the list from my part driver. Is this possible? I see that there is a Position property on the shape metadata object. But how do I get to the content item's shape metadata from a part driver Display method? Is this even possible?

Orchardcms Orchard background task not persisting PartRecords to the database

I'm trying to use a background task to gather Likes/Comments from the Facebook Graph APi and use that to drive our blog's trending. Here the trendingModels have already been populated and are being used to fill in the TrendingParts.GraphId and TrendingParts.TrendingValue. I'm not getting any exceptions and the properties on TrendingPart point to the fields in the TrendingPartRecord. Yet nothing persists to the database, any ideas why? _orchardsServices is IOrchardServices var articleParts

Orchardcms Empty content picker does not return null when empty

I have a content picker for a custom content type that needs to be placed in a specific zone on the page. It is working just fine with code like this (in Orchard 1.9.1): In placement.info: <Match ContentType="MyContentType"> <Match DisplayType="Detail"> <Place Fields_ContentPicker-MyFieldName="MyZoneName:1"/> </Match> </Match> In the shape file (such as Content-MyContentType.Detail.cshtml): @if (Model.MyZoneName != null) { <div class="m

Orchardcms How can I set the custom path of an AutoroutePart programmatically in a migration in Orchard?

In my Migrations.cs file I'm attaching an AutoroutePart to a Content Item. ContentDefinitionManager.AlterTypeDefinition("Faq", type => type .WithPart("AutoroutePart") ); How can I tell the AutoroutePart to use some arbitrary string + the Content Item's slug as the custom path? I know I can change the settings of fields using .WithSetting("FieldSettings.Setting","Value") but this doesn't seem to be an option for Parts. I also wouldn't know how to refer to the SlugToken in code.

Orchardcms Orchard CMS render media public URL for path in theme razor template

Looking to add a theme setting for a site logo URL to render in the header. However, when using Azure blob storage for images, the URL is not relative and will need to ask the media library for the public URL. Just wondering what the best way to do this is from the shape template for my header / branding? Currently is only working with file system media storage: <a class="logo" href="@Href("~/")"> <img width="103" height="39" alt="" src="@Href(settings.SiteLogoUrl)" > </a&

Orchardcms How to Add MVC Views in Orchard CMS Custom Module

When I am creating a custom module containing my own Controllers and Views, the default project created by Code Generation creates a project that is like MVC but Visual Studio does not recognize it as an MVC project so it doesn't offer the normal "Add View" tooling as it does in a "real" MVC project. I have seen posts talking about changing the Project type GUID in the project file but I am hoping there is an alternative to this approach. I have also seen tutorials where the presenter is using

Orchardcms Orchard CMS Theme Images Not Showing Up

I'm using the correct helper call to get the URL for an image in my theme: @Url.Content(Html.ThemePath(WorkContext.CurrentTheme, "/Content/Images/my-image.png") ...and I know the image is there and is readable. Yet it's not showing up when I try to browse to it! Why is this happening?

Orchardcms Different view alternates with Orchard Multi-Tenancy

I have an Orchard CMS installation with the Multi-Tenancy module enabled and 2 tenants set-up. Both tenants are using the same theme. What I want is to be able to create view alternates to target each tenant, so that for example: ~/Themes/MyTheme/Views/Content.Tenant1.cshtml would target tenant 1 and ~/Themes/MyTheme/Views/Content.Tenant2.cshtml would target tenant 2. I realise that I could do it with 2 different (yet very similar) themes, but that feels like needless duplication.

Orchardcms Accessing fields on DriverResult Editor POST in Orchard CMS 1.7

crosspost: https://orchard.codeplex.com/discussions/473252 When updating Content Items back in 1.6, I was able to get field values on POST from the HttpContext like below: var lat = HttpContext.Current.Request["Latitude"]; Ever since 1.7, those return null and upon inspecting the request, it doesn't have those properties. I checked some more and couldn't find the fields anymore. I even tried injecting the IHttpContextAccessor but still nothing. Does anyone know where they are held now? A

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

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"

Orchardcms What's the alternate naming convestion for part fields

What is the file name I should give in my Orchard CMS theme to override the title of a blog post summary. Conditions my alternate shape should apply only to blog post only to the title of the blog post only when the blog post is displayed in summary Sadly going through the documentation this I couldn't figure it out.

Orchardcms Are Containable Parts and Widgets exclusive of each other?

I'm struggling with a decision to choose between creating a custom type as a Content Type with the Containable Part, or to create them as a Widget. I know that an existing Content Part can be used to create a new Widget, but this leaves me with having to create each instance from within the Widget Management section of the dashboard (I think). I'm not able to select a content item that already exists and have it act as a widget. What I would really like is to have the ability to select a single

Orchardcms Retrieving term ids for taxonomy field

I'm running into slow performance related to select N+1 issues when accessing the taxonomy terms associated with content items of a custom content type. I've worked around issues like this in the past by getting all the related content ids up front and so I can use the ContentManager's GetMany method to get them all in one shot. For example, this has worked well for the MediaLibraryPickerField as I can easily get at the media content ids using the Ids property on the field. Here's an example si

Orchardcms OrderByDescending in Orchard CMS

I have a issue with OrderByDescending in Orchard CMS Example Data: ID Name DomainId 1 First 2 2 Join 3 3 Peter 1 4 Abert 1 5 saha 2 with LinQ to SQL code here: IQueryable().OrderByDescending(r=> r.DomainId == 2) it returns the correct result ! ID Name DomainId 1 First 2 5 saha 2 2 Jo

Orchardcms Unable to read Title of TitlePart | Orchard CMS 1.7 |

This is in reference and related to my previous question here. I am trying to read the Title of the part TitlePart as seen below code: var query = Services.ContentManager.Query("SideBarLinks").List(); foreach (var sideBarLinks in query) { foreach(var part in sideBarLinks.Parts) { if (part is Orchard.Core.Title.Models.TitlePart) { // Below Line throws error //string title = part.Title;

Orchardcms How to access nested Part properties in Email Workflow?

I have a Registration ContentType, which contains a ContentPicker field for a Building Item, which contains a Geolocation Part with some properties like Latitude and Longitude. When a new Registration is Published, it triggers a custom Workflow that sends out an email. In the body of the email I can get to the fields of the Building using tokens like this: {Content.Fields.Registration.Building.Content.Fields.Building.Address} How can I get to the property values of the Geolocation Part contain

Orchardcms SchemaBuilder with complex types

I want to store complex content part record but couldn't create columns with SchemaBuilder in Migrations file. Here are my classes: public enum BoxInheritance { Empty, Inherit, Enter } public class BoxSize { public string Width { get; set; } public string Height { get; set; } } public class BoxSpace { public string Left { get; set; } public string Right { get; set; } public string Top { get; set; } public string Bottom { get; set; } } public class BoxPartRecord :

Orchardcms How to make Orchard to have more than one pager on the custom page

Background: I have customize Content page by introducing a custom module. Right now I have an obstacle to have tow pagers on the page at the header and at the footer of my content page. Strangely, Orchard allows only one pager on the page. Adding two @Display(Model.Pager) does not help. Code: @Display(Model.Pager) <fieldset class="contentItems bulk-items"> @Display(Model.ContentItems) </fieldset> @Display(Model.Pager) Thanks for the help in advance.

Orchardcms Blog missing after Orchard 1.4 upgrade

I've recently upgraded my Orchard site to version 1.4. Since I had an source code enlistment I just updated to the latest Default branch, and built and deployed the new version. Since the deployment, my blog is totally missing. Thinking it had something to do with the new Autoroute feature, I enabled the Migrate14 module and migrated to 1.4, but still the blog is totally missing in both the Admin UI and at the site. Do anyone have any ideas on what might have gone wrong?

Orchardcms How to plugin custom WidgetsService in Orchard CMS

I need to create a custom WidgetsService implementation and use that instead of the default Orchard implementation. I assume I need to work with autofac to register my own implementation but not sure on the details. Could you help with step-by-step instructions?

Orchardcms Orchard: Creating a user from the register screen NOT dashboard

Hey Guys…So im using Orchard CMS 1.6 and instead of creating a user/role from the dashboard, I would like the user to register from the home page. This is done by leaving the ‘username’ and ‘password’ field blank on the home page and clicking ‘Sign In’. They are then navigated to a ‘Log On’ page which displays a ‘Register link’. This allows the user to enter 4 fields to create an account. ‘Username, Email, Password, and confirm password’. I would like to add additional fields to this form but

Orchardcms how to display a list of content items from the front end?

Using Orchard 1.6 I have created a form (accessed from the front end by a user) This form contains a content part so when it is submitted it will be stored as a content item. From the front end I would then like to display in a table format the previous content items that ONLY this user has submitted ( as the user will be logged in) As the admin I can view this list from the dashboard, however the user only has access to the front end. How can I display a list of content items from the front

Orchardcms How to define relationships between content items in Orchard CMS without select N+1

We currently have some parent child relationships between Orchard content items built using the Container/Containable structure. The parent item is a manufacturer, the child item is a range, the child of a range is a product. We have this kind of parent child relationship 4 levels deep. This is all working but on a page where we have a list of products from different manufacturers and want to display some information about the manufacturer with each product performance is terrible due to selec

Orchardcms How to add content picker filed in Form in a custom Orchard Workflow activity

I have created an a custom Orchard Workflow activity, this activity allows user to select a content Item from already created contents in Admin UI. Now to allow selection of content Item I want to use content picker field in Activity Form. But I noticed that Activity forms use only basic shapes, I could not find any way to create a form that can use already crated custom fields or allows building of form using custom editor shape. I have been able to achieve something using select list (like b

Orchardcms Settings on ContainerPart on new type

I'm trying to create a new content type in a migration that has a ContainerPart attached with some settings already applied. ContentDefinitionManager.AlterTypeDefinition("NewType", cfg => cfg .DisplayedAs("New Type") .WithPart(typeof(TitlePart).Name) .WithPart(typeof(ContainerPart).Name) .WithSetting("ContainerPartSettings.ItemsShownDefault", "False") .WithPart(typeof(CommonPart).Name) .WithPart(typeof(IdentityPart).Name) .Crea

  1    2   3   4   5   6  ... 下一页 共 6 页