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
<!-- TemplateBeginRepeat name="Component.Fields" --> | |
@@Field.Name@@ | |
<!-- TemplateBeginRepeat name="Field.Values" --> | |
<!-- TemplateBeginIf cond="Field.ContentType = 'text/plain'" --> | |
@@RenderComponentField(FieldPath, TemplateRepeatIndex)@@ | |
<!-- TemplateEndIf --> | |
<!-- TemplateBeginIf cond="Field.ContentType = 'tridion/field'" --> | |
<!-- TemplateBeginRepeat name="Field.Fields" --> | |
@@Field.Name@@ | |
<!-- TemplateBeginRepeat name="Field.Values" --> |
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
<!-- TemplateBeginRepeat name="Component.Fields" --> | |
@@Field.Name@@ | |
<!-- TemplateBeginRepeat name="Field.Values" --> | |
<!-- TemplateBeginIf cond="Field.ContentType = 'text/plain'" --> | |
@@RenderComponentField(FieldPath, TemplateRepeatIndex)@@ | |
<!-- TemplateEndIf --> | |
<!-- TemplateBeginIf cond="Field.ContentType = 'tridion/field'" --> | |
<!-- TemplateBeginRepeat name="Field.Fields" --> | |
@@Field.Name@@ | |
<!-- TemplateBeginRepeat name="Field.Values" --> |
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
</xsl:otherwise> | |
</xsl:choose> | |
</xsl:variable> | |
<xsl:choose> | |
<xsl:when test="$content/linkitem:link_component"> | |
<xsl:apply-templates select="$content/linkitem:link_component"> | |
<xsl:with-param name="linktitle" select="$link_title"/> | |
<xsl:with-param name="linktext" select="$linktext"/> | |
<xsl:with-param name="linkclass" select="$linkclass"/> | |
</xsl:apply-templates> |
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
<div class=”@Component.Fields.NewsStyle”> | |
<img src=”@Fields.HeaderImage.ID” alt=”@Fields.HeaderImage.AltText” /> | |
@* Note that Fields is just a shortcut to Component.Fields *@ | |
<h2>@Fields.Header</h2> | |
<h5>@Fields.NewsDate.ToString(“dd/MM/yy hh:mm”)</h5> | |
<div class=”body-text”> | |
@Fields.BodyText | |
</div> | |
<ul> | |
@* Now we'll loop over a ComponentLink field and grab the component title and a field *@ |
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
function InitImportExport{ | |
if (-not $global:ImportExportIsInitialized) { | |
Add-Type -assemblyName System.ServiceModel | |
Add-Type -Path 'C:\Program Files (x86)\Tridion\bin\client\ImportExport\Tridion.ContentManager.ImportExport.Client.dll' | |
Add-Type -Path 'C:\Program Files (x86)\Tridion\bin\client\ImportExport\Tridion.ContentManager.ImportExport.Common.dll' | |
Import-Module Reflection | |
Import-Namespace Tridion.ContentManager.ImportExport | |
Import-Namespace Tridion.ContentManager.ImportExport.Client | |
$global:ImportExportIsInitialized = $true | |
} |
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> | |
<system.serviceModel> | |
<bindings> | |
<basicHttpBinding> | |
<binding name="ImportExport_basicHttpBinding" maxReceivedMessageSize="41943040"> | |
<readerQuotas maxStringContentLength="41943040" maxArrayLength="41943040" /> | |
<security mode="TransportCredentialOnly"> | |
<!-- For LDAP or SSO authentication of transport credentials, use clientCredentialType="None" --> | |
<transport clientCredentialType="Windows" /> |
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
function get-ImportExportServiceClient { | |
param( | |
[parameter(Mandatory=$false)] | |
[AllowNull()] | |
[ValidateSet("Service","Upload","Download")] | |
[string]$type="Service" | |
) | |
InitImportExport | |
$binding = new-object System.ServiceModel.BasicHttpBinding |
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
function DownloadPackageToFile($packageId, $filePath){ | |
InitImportExport | |
$downloadService = get-ImportExportServiceClient -type Download | |
try { | |
$packageStream = $downloadService.DownloadPackage($packageId, $true) | |
$fileStream = [IO.File]::Create($filePath) | |
$packageStream.CopyTo( $fileStream) | |
} |
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
$impexp = get-ImportExportServiceClient | |
$contentFolderSelection = new-object SubTreeSelection "tcm:3-1005-2",$false | |
$exportInstruction = new-object ExportInstruction | |
$exportInstruction.BluePrintMode = [BluePrintMode]::ExportSharedItemsFromOwningPublication | |
($processId = $impexp.StartExport( @($contentFolderSelection),$exportInstruction)) | |
WaitForImportExportFinish $impexp $processId | |
DownloadPackageToFile $processId "package.zip" | |
$uploadId = UploadPackageFromFile "package.zip" |
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
# Depends on PowerShell Reflection module (http://poshcode.org/search/Reflection) | |
# Depends on Tridion Powershell Modules (http://code.google.com/p/tridion-powershell-modules/) | |
$autoLocalize = $true | |
import-module Tridion-CoreService | |
$core = Get-TridionCoreServiceClient | |
import-module Reflection | |
import-namespace Tridion.ContentManager.CoreService.Client |
OlderNewer