Skip to content

Instantly share code, notes, and snippets.

Robert Curlette rcurlette

Block or report user

Report or block rcurlette

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rcurlette / UpdateMMCompMetadataXml.cs
Created May 24, 2018
Tridion Update Multimedia Component Metadata XML using Core Service
View UpdateMMCompMetadataXml.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using Tridion.ContentManager.CoreService.Client;
namespace FixMMCompMetadataField
rcurlette / json_net_sample.cs
Last active Jan 24, 2018
Json.Net Code Sample
View json_net_sample.cs
// get our JSON objects
dynamic jsonObject = JObject.Parse(jsonContent);
dynamic metaPage = jsonObject.MetadataFields;
// check if property exists in the JSON
if (metaPage.Property("contact") == null)
dynamic contact = GetContact(sgMetadataFields);
if(contact != null)
View List-iis-sites
Import-Module WebAdministration
$logfile = "$PSScriptRoot\Sites_$(get-date -format `"yyyyMMdd_hhmmsstt`").log"
#this is our logging function, it must appear above the code where you are trying to use it.
#note there is a technique to get around needing this at the top, read the blog post to find out more...
function log($message, $color)
View Migrate-Sites-ToWeb8-IIS
# .\UpgradeSitesToWeb8.ps1 -discoveryServiceUrl "http://someserver:8882/discovery.svc" -csvSiteFile D:\SiteTest.csv -verbose
#Upgrade each site
View VBScriptMediator
' For serious fun, go grab a copy of the Razor Mediator and enjoy the power of .Net and a close to TOM API!
View GetTridionPublishTargets
private List<TridionItem> GetPublishTargets(string publicationUri, SessionAwareCoreServiceClient client)
List<TridionItem> pubTargetList = new List<TridionItem>();
var pubTargets = client.GetSystemWideList(new PublicationTargetsFilterData());
foreach (PublicationTargetData pubTargetdata in pubTargets)
PublicationTargetData target = (PublicationTargetData)client.Read(pubTargetdata.Id, new ReadOptions());
LinkToPublicationData[] pubDataItems = target.Publications;
foreach (LinkToPublicationData publicationData in pubDataItems)
View CoreServiceImpersonation
string endpointName = "netTcp_2013";
SessionAwareCoreServiceClient client = new SessionAwareCoreServiceClient(endpointName);
// Actions- Publish a page, create Component, etc
rcurlette / EventSystem.dll.config
Last active Aug 29, 2015
Sample EventSystem.dll.config
View EventSystem.dll.config
<?xml version="1.0" encoding="utf-8" ?>
<add key="ConnectionString" value="Server=ServerX;Database=DbX;User Id=User;Password=pw123"/>
<add key="PublicationConfigComponentWebdavUrl" value="/webdav/002%20Web/Building%20Blocks/System/SystemComponents/PublicationConfigSettings%20DEFAULT.xml"/>
rcurlette / TridionEventSystemAppConfigHelper
Last active Aug 29, 2015
Tridion Event System app.config helpers
View TridionEventSystemAppConfigHelper
using System;
using System.Configuration;
using System.Reflection;
using System.Runtime.Caching;
namespace Tridion.EventSystem
/// <summary>
/// Configuration file should be named the same as the Event System DLL with '.config' at the end.
/// ie. TridionEventSystem.dll.config
rcurlette / OrmLiteExample.SqlServer
Last active Aug 29, 2015
ServiceStack ORMLite SqlServer example
View OrmLiteExample.SqlServer
using ServiceStack.DataAnnotations;
using ServiceStack.OrmLite;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
You can’t perform that action at this time.