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
@@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() | |
{ | |
} |
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 static MvcHtmlString RenderPresentation(this HtmlHelper html, ComponentPresentation presentation) | |
{ | |
ComponentMetaFactory componentMetaFactory = new ComponentMetaFactory(presentation.PublicationId); | |
IComponentMeta componentMeta = componentMetaFactory.GetMeta(string.Format("tcm:{0}-{1}", presentation.PublicationId, presentation.ComponentId)); | |
return html.Action(componentMeta.CustomMeta.GetValue("action").ToString(), | |
componentMeta.CustomMeta.GetValue("controller").ToString(), | |
new | |
{ | |
publicationId = presentation.PublicationId, |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
//Get Articles | |
string url = @"http://www.thebolditalic.com/articles.rss?page={0}"; | |
var credentials = TwitterCredentials.CreateCredentials("Access_Token", "Access_Token_Secret", "Consumer_Key", "Consumer_Secret"); | |
int count = 0; | |
int loop = 0; | |
for (int i = 1; i < 200; i++) |
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) | |
{ | |
if ( typeof String.prototype.endsWith != 'function' ) { | |
String.prototype.endsWith = function( str ) { | |
return this.substring( this.length - str.length, this.length ) === str; | |
} | |
}; | |
try | |
{ |
OlderNewer