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
<!-- TemplateBeginIf code="ComponentTemplateNameCPsCount > 0" --> | |
<!-- TemplateBeginRepeat name="ComponentTemplateNameCPs" --> | |
RenderComponentPresentation() | |
<!-- TemplatEndRepeat --> | |
<!-- TemplateEndIf--> |
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:choose> | |
<xsl:when test="$someValue = 1"> | |
<xsl:value-of select="someXpath" /> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:value-of select="defaultXpath" /> | |
</xsl:otherwise> | |
</xsl:choose> |
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
//The alternative uses $$Label$$ | |
const string pattern = @"\$\$([A-Za-z0-9_-]+)\$\$"; | |
//Replacement regex for %%Label%% | |
const string replacement = "%%$1%%"; | |
Item output = package.GetByName(Package.OutputName); | |
string outputString = Regex.Replace(output.GetAsString(), pattern, replacement); | |
output.SetAsString(outputString); | |
package.PushItem(Package.OutputName, output); |
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
<Storage Type="persistence" Id="defaultdb" dialect="MSSQL" Class="com.tridion.storage.persistence.JPADAOFactory"> | |
<Pool Type="jdbc" Size="5" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" /> | |
<DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource"> | |
<Property Name="serverName" Value="YOURSERVER" /> | |
<Property Name="portNumber" Value="1433" /> | |
<Property Name="databaseName" Value="YourDatabase" /> | |
<Property Name="user" Value="YourUser" /> | |
<Property Name="password" Value="*****" /> | |
</DataSource> | |
</Storage> |
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
<Publication Id="42" defaultStorageId="MSSQL_01" cached="false"> | |
<Item typeMapping="Binary" itemExtension=".jpg" storageId="defaultFile" cached="true"/> | |
<Item typeMapping="Binary" itemExtension=".gif" storageId="defaultFile" cached="true"/> | |
<Item typeMapping="Binary" itemExtension=".pdf" storageId="defaultFile" cached="true"/> | |
<Item typeMapping="Binary" itemExtension=".jpeg" storageId="defaultFile" cached="true"/> | |
<Item typeMapping="Binary" itemExtension=".png" storageId="defaultFile" cached="true"/> | |
<Item typeMapping="Binary" itemExtension=".ico" storageId="defaultFile" cached="true"/> | |
</Publication> |
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
<ItemTypes defaultStorageId="defaultdb" cached="false"> | |
<!-- Broker config stuff --> | |
</ItemTypes> |
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
[TcmTemplateTitle("Build ASP.NET Sitemap File from Taxonomy")] | |
[TcmTemplateParameterSchema("resource:BuildingBlocks.Tridion.ModularTemplates.Resources.Build Sitemap from Taxonomy Parameter Schema.xsd")] | |
public class BuildSitemapFromTaxonomy : Base.TemplateBase | |
{ | |
//Code snipped | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width" /> | |
<title>_Layout.cshtml</title> | |
</head> | |
<body> | |
<header><h1>Welcome to DD4T</h1></header> | |
<div> | |
@RenderBody() |
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 DD4T.ContentModel.IPage | |
@{ | |
Layout = "~/Views/Shared/_Layout.cshtml"; | |
} | |
<h1>Hello from landing page: @Model.Title</h1> | |
<ul> | |
<li>I live in: @Model.StructureGroup.Title</li> | |
<li>I have @Model.ComponentPresentations.Count component presentations</li> |
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
namespace DD4T.Web.Mvc.Ninject | |
{ | |
///<summary> | |
/// NinjectDependencyResolver | |
/// 2012-10-22 | |
/// Author: Robert Stevenson-Leggett | |
///</summary> | |
public class NinjectDependencyResolver : IDependencyResolver | |
{ | |
private readonly IKernel _kernel; |
OlderNewer