This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Translate(string identifiableObjectId, string owningRepositoryId) | |
{ | |
if (!string.IsNullOrWhiteSpace(identifiableObjectId) && !string.IsNullOrWhiteSpace(owningRepositoryId)) | |
{ | |
//Create instance of TranslationJobManager | |
TranslationJobManager jobManager = new TranslationJobManager("DOMAIN\\USER"); | |
//Create a PUSH job (job created at the source publication) | |
TranslationJob translationJob = jobManager.CreateJob("JobName", owningRepositoryId, TranslationJobType.PushJob); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TranslationManagerPlugIn] | |
class TranslationManagerPlugin | |
{ | |
public TranslationManagerPlugin() | |
{ | |
//Subscribe to Translation Manager events | |
TranslationJobManager.TranslationJobCreated += TranslationJobManager_TranslationJobCreated; | |
//TranslationJobManager.TranslationJobLoaded += TranslationJobManager_TranslationJobLoaded; | |
//TranslationJobManager.Error += TranslationJobManager_Error; | |
//TranslationJobManager.ItemSelected += TranslationJobManager_ItemSelected; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AmbientDataContext.CurrentClaimStore.Put(new Uri("CLAIM_URI"), | |
CLAIM_VALUE, | |
Tridion.ContentDelivery.AmbientData.Runtime.ClaimType.Normal); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Tridion.ContentDelivery.AmbientData; | |
namespace Tridion.ADF.Modules.DayOfWeek | |
{ | |
public class DayOfWeekModule : IHttpModule | |
{ | |
public DayOfWeekModule() { } | |
void IHttpModule.Dispose() { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function (UI, B, e, a, r, d) | |
{ | |
try | |
{ | |
while (r = UI.frames[e++]) | |
{ | |
if ((a = r.$display && r.$display.getView()) && a.getId() == B) | |
{ | |
d = a; | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@model PageViewModel | |
@{ | |
Layout = "~/Views/Shared/_Layout.cshtml"; | |
} | |
<h1>@@Model.Title</h1> | |
<div> | |
@@if(Model.ComponentPresentations != null) | |
{ | |
foreach (ComponentPresentation componentPresentation in Model.ComponentPresentations) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@model ProductsViewModel | |
</div> | |
<div> | |
<h2>@Component.title</h2> | |
<p>@Component.summary</p> | |
</div> | |
@foreach(var product in Component.products) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PageController : Controller | |
{ | |
public ActionResult RenderPage(string url) | |
{ | |
TridionHelper utils = new TridionHelper(); | |
PublicationMeta publicationMeta = utils.GetPublicationMetaByUrl("/"); | |
if (String.IsNullOrEmpty(url)) | |
url = "Index.html"; | |
if (!Path.HasExtension(url)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TridionPathProvider tridionPathProvider = new TridionPathProvider(); | |
HostingEnvironment.RegisterVirtualPathProvider(tridionPathProvider); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TridionPathProvider : VirtualPathProvider | |
{ | |
public TridionPathProvider() | |
: base() | |
{ | |
} | |
protected override void Initialize() | |
{ | |
} |
OlderNewer