orchardcms

Orchard Contact Forms

对着背影说爱祢 提交于 2019-12-05 01:57:39
I've been trying to setup a contact form via Orchard CMS v1.6 but I'm not really sure how to do it. I tried installing the Custom Forms module but i think this isn't compatible with the latest version I'm using. Any suggestions? The Custom Forms module is very powerful and flexible, but it's not obvious at first how to make a contact form using it. Once you've figured it out though you can do a lot more with it. Step 1 - Create a content type for the contact information you want to collect In /Admin/ContentTypes click 'Create new type' to make a type with all the info you want your user to

Multi-tenancy support: Umbraco vs Orchard Project

耗尽温柔 提交于 2019-12-05 00:13:05
I am currently using an older version of Umbraco (4.03) and I have several basic sites (mostly 1 pagers) running under the same IIS Application. I have a shared hosting account with Winhost.com, which doesn't offer multiple site application roots, just domain pointers, so I'm limited to a single CMS installation that supports multi-tenancy. The Umbraco multi-tenancy setup is a bit hacky and I really need to upgrade. It seems that Orchard is more focused on multi-tenancy support. My Umbraco installation has some issues with shared skins, which has always been a little annoying. So, the basic

How to include style sheets and js files inthe view of Orchard cms

余生颓废 提交于 2019-12-04 21:46:37
How to include style sheets and js files inthe view of Orchard cms, Failed to load resource: the server responded with a status of 404 (Not Found) Create a ResourceManifest.cs file in your Theme or Module. using Orchard.UI.Resources; namespace MyNameSpace { public class ResourceManifest : IResourceManifestProvider { public void BuildManifests(ResourceManifestBuilder builder) { var manifest = builder.Add(); manifest.DefineStyle("MyScriptName").SetUrl("~/Modules/MyModule/Scripts/scripts.js"); manifest.DefineScript("MyStyleName").SetUrl("~/Themes/MyTheme/Styles/site.css"); } } } In your view,

Eager loading a field

和自甴很熟 提交于 2019-12-04 21:40:16
Is it possible to eager load a field when querying content using the ContentManager? I'm using the ContentManager to retrieve all content items of a specific content type. The content type has a MediaLibraryPickerField on it which is creating a select n+1 issue when I iterate over the results of the query. I'd like to force this data to be loaded upfront (join on initial query). This seems straightforward for a ContentPart but I can't get it to work for a ContentField. Is this possible or is there another way to avoid the select n+1 issue with fields? Here's what I've tried but it has not

Orchard 1.7 - contents of Media folders not listed in media library

断了今生、忘了曾经 提交于 2019-12-04 19:19:26
I've got a problem listing the images from the Media directory for my Orchard site. When trying to add an image using the new media picker I see the list of folders, but when I select one the contents are not listed (see image below). If I 'import' an image it does appear, but I surely don't need to import every file I'm ever going to use each time, do I? I must be the only person having this problem because I can't find any reference to it any where else on the web, so thanks in advance. PS. Sorry if my question isn't perfectly formed - it's my first time posting.... Enable the Update feature

How Orchard CMS does the logging?

不问归期 提交于 2019-12-04 18:51:38
问题 I'm working with Orchard CMS and it is better CMS for me. I want to understand how it does the logging and whether I can add my own logging or not. I saw that Orchard uses NullLogger class and it does no work. I've opened the App_Data.Logs folder and have seen that there are the log files. But how? I searched in code where is the trick that replaces NullLogger with log4net (I guess this is log4net, because the log format and the formatting for log4net.config are very similar) but I haven't

Can I make Orchard show the entirety of a blog post in the blog list?

廉价感情. 提交于 2019-12-04 18:29:14
问题 I just set up Orchard and noticed that the preview widget only shows the first couple sentences with the standard "more" link. Is there a way to override this functionality without creating a custom widget? I would like Orchard to show the entirety of my latest five posts. 回答1: Sure, just put this Parts.Common.Body.Summary.cshtml in the views directory of your theme: @{ Orchard.ContentManagement.ContentItem contentItem = Model.ContentPart.ContentItem; var bodyHtml = new HtmlString(Model.Html

Trying to hide Content Parts on Content Type

荒凉一梦 提交于 2019-12-04 18:16:05
I am building Content Types and adding Content Parts specific to a Client and Attorney. All of these parts have fields and/or content pickers, etc. I want to restrict the Client Role to see only Client Content Parts, while I just allow the Attorney Role to see any Content Parts, including it's own Attorney Content Part for a particular Content Type. Again, these are all on the same Content Type, so Content Permissions will not work (except on the Content Type in general). I want to hide the Attorney Content Parts when a Client is logged on. I have tried using this: public override void

Orchard Custom Module - Model being picked up by NHibernate - Requiring virtual properties

谁说我不能喝 提交于 2019-12-04 17:13:02
I'm working on building a custom module in Orchard CMS, and I have the following Controller Action: public ActionResult Inventory() { var models = _repository.Get<MyModel>(); return View(new MyViewModel() { MyModels = models.ToList() }); } Now, when Orchard builds this, an exception occurs, because NHibernate has picked up MyModel because its being looked at as a PartRecord, which I do not want it to be. The exception is method get_Id should be 'public/protected virtual' or 'protected internal virtual'. I can add virtual to the properties, but I want to avoid having NHibernate have any part in

Orchard CMS Module development workflow

拥有回忆 提交于 2019-12-04 16:38:41
How can I force Orchard to rerun the Migrations.Create method to re-create my module's data? All the tutorials I've seen use the Migrations.UpdateFrom methods to make Orchard recognize module data changes, but this means I'll have to create a new method every time I make a change during development. These methods make sense for actual version updates, but not for initial development. I've tried disabling and re-enabling the module, no dice. I've also tried uninstalling and reinstalling the module, but running the uninstall command permanently deleted the module from my computer, bypassing the