This project is read-only.

Version 1.0

Rating: No reviews yet
Downloads: 39
Released: May 7, 2011
Updated: May 7, 2011 by zhong_zhaofeng
Dev status: Stable Help Icon

Recommended Download

Application Orchard.Module.RaisingStudio.Trigger.1.0.nupkg
application, 25K, uploaded May 7, 2011 - 22 downloads

Other Available Downloads

Application RaisingStudio.Trigger.zip
application, 19K, uploaded May 7, 2011 - 17 downloads

Release Notes

Sample Code:

Condition:
@if (Model.Content.ContentType == "Page")
{
@: true
}
else
{
@: false
}



Action:
@using Orchard;
@using Orchard.Security;
@using Orchard.Settings;
@using Orchard.ContentManagement;
@using Orchard.ContentManagement.Handlers;
@using Orchard.ContentManagement.Aspects;
@using Orchard.Core.Common.Models;
@using RaisingStudio.Trigger.Services;
@using RaisingStudio.Razor.Services;
@using RaisingStudio.Trigger.Models;
@using RaisingStudio.Razor.Models;

@{
IContentManager contentManager = Model.ContentManager;
var bodyText = Model.As<BodyPart>().Text;
var razorPage = contentManager.Create<RazorContentPart>("RazorPage", VersionOptions.Draft);
razorPage.Template = bodyText;
contentManager.Publish(razorPage.ContentItem);

@: true
}

Reviews for this release

No reviews yet for this release.