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
Write-Host "Running Content Manager upgrade script" | |
$items = Get-ChildItem -File -Path dd4t-tbb | |
[Reflection.Assembly]::LoadWithPartialName("System.EnterpriseServices") | Out-Null | |
[System.EnterpriseServices.Internal.Publish] $publish = new-object System.EnterpriseServices.Internal.Publish | |
foreach($item In $items) | |
{ | |
Write-Host "Installing $item in GAC" | |
$publish.GacInstall($item.FullName) |
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
Test Gist |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Configuration Version="7.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="schemas/cd_storage_conf.xsd"> | |
<Global> | |
<ObjectCache Enabled="false"> | |
<Policy Type="LRU" Class="com.tridion.cache.LRUPolicy"> | |
<Param Name="MemSize" Value="16mb"/> | |
</Policy> | |
<Features> |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; | |
using BuildingBlocks.DD4T.MarkupModels; | |
using DD4T.Mvc.Controllers; | |
using System.Web.Mvc; |
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
private bool SmartPhoneContext(HttpContextBase context) | |
{ | |
try | |
{ | |
var contextEngine = new ContextEngine(); | |
return contextEngine.Device.IsMobile && !contextEngine.Device.IsTablet && contextEngine.Device.DisplayWidth > 480; | |
} | |
catch(Exception) | |
{ | |
return false; |
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 ActionResult Heading(IComponentPresentation componentPresentation) | |
{ | |
var model = ComponentViewModelBuilder.Build<HeadingViewModel>(componentPresentation.Component); | |
return View(model); | |
} |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
//This gives us StreamReader | |
using System.IO; | |
//This gives us the Data Contract info from the client | |
using Tridion.ContentManager.CoreService.Client; | |
//This gives us the core service methods and properties | |
// specific to workflow: must reference Tridion.ContentManager.CoreService.Workflow from |
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 DD4T.Mvc.Html | |
@model DD4T.ContentModel.IComponentPresentation | |
<div> | |
@Html.SiteEditComponentPresentation(Model) | |
<div class="image"> | |
@Html.SiteEditField(Model, Model.Component.Fields["image"]) | |
<img src="@Model.Component.Fields["image"].LinkedComponentValues[0].MultiMedia.Url" alt="blah"/> | |
</div> |
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 System.Web.Mvc; | |
using DD4T.ContentModel.Contracts.Providers; | |
using DD4T.ContentModel.Factories; | |
using DD4T.Providers.SDLTridion2011sp1; | |
using log4net; | |
namespace BuildingBlocks.DD4T.Core | |
{ | |
public static class DD4TResourceHelper | |
{ |
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 DD4T.Mvc.Html | |
@model DD4T.ContentModel.IComponentPresentation | |
<div> | |
@Html.SiteEditComponentPresentation(Model) | |
<h1>@Html.SiteEditField(Model, Model.Component.Fields["title"])@Model.Component.Fields["title"].Value</h1> | |
</div> |
NewerOlder