orchardcms-1.6

Create an Alias from the Recipe in Orchard

烈酒焚心 提交于 2019-12-10 18:36:17
问题 I want to create the following Alias from the recipe. How is this achieved? 回答1: I have created this class to add a command for Orchard to create a new alias from command line or recipe: using Orchard; using Orchard.Alias; using Orchard.Commands; using System; using Orchard.Environment; using System.Linq; namespace Contrib.Foundation.Common.Commands { public class AliasCommands : DefaultOrchardCommandHandler { private readonly Work<WorkContext> _workContext; private readonly IAliasService

Orchard Navigation - how to make menu link not clickable

夙愿已清 提交于 2019-12-10 17:25:23
问题 I have following menu navigation: home product product 1 product 2 news press releases about us Every menu item above links to a Content, except "product".I need to make it so when the user click "product" would not go anywhere. I tried to use "Custom Link", and enters "#" or "javascript:void(0)" in the url, however that does not work since Orchard always prefix the url with "/". Also, I tried to use "Html Menu Item" and enter "product" in the html body, but always rendered as <li><span class

Orchard CMS Speed Issues

我的未来我决定 提交于 2019-12-10 10:43:42
问题 I'm setting up an Orchard CMS site and noticing that it is incredibly slow. It is running on a VPS that hosts a couple of other MVC based websites which all run fine, so the server doesn't appear to be the issue. I've read that renaming the Sample.Host.Config file to Host.Config should fix the issue. Which it seems to do for a few hours, until randomly I then get the following error and the site no longer works. The type 'Orchard.Environment.Configuration.AzureBlobTenantManager' could not be

Generating Shapes with ShapeHelper in Orchard CMS - Type Not Found

梦想与她 提交于 2019-12-08 01:44:39
问题 I'm building a site using Orchard CMS and creating my own custom modules. I have been following a couple of tutorials and so-far-so-good. I don't understand how the .ShapeHelper() method works and it's giving me a little trouble. The following code, from my Driver file, works perfectly fine and generates my view on the front-end. protected override DriverResult Display(SubscribersFormPart part, string displayType, dynamic shapeHelper) { // setup model part.DateStamp = System.DateTime.Now;

Generating Shapes with ShapeHelper in Orchard CMS - Type Not Found

送分小仙女□ 提交于 2019-12-06 07:26:16
I'm building a site using Orchard CMS and creating my own custom modules. I have been following a couple of tutorials and so-far-so-good. I don't understand how the .ShapeHelper() method works and it's giving me a little trouble. The following code, from my Driver file, works perfectly fine and generates my view on the front-end. protected override DriverResult Display(SubscribersFormPart part, string displayType, dynamic shapeHelper) { // setup model part.DateStamp = System.DateTime.Now; return ContentShape("Parts_SubscribersForm", () => shapeHelper.DisplayTemplate(TemplateName: "Parts

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