Test-BaseTemplate

Syntax

1
Test-BaseTemplate -Item <Item> -TemplateItem <TemplateItem[]>
2
Test-BaseTemplate -Item <Item> -Template <String[]>
3
Test-BaseTemplate -Path <String> -TemplateItem <TemplateItem[]>
4
Test-BaseTemplate -Path <String> -Template <String[]>
5
Test-BaseTemplate -Id <String> -TemplateItem <TemplateItem[]>
6
Test-BaseTemplate -Id <String> -Template <String[]>
7
Test-BaseTemplate [-Database <String>]
Copied!

Detailed Description

© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions

Parameters

-Item <Item>

Aliases
Required?
true
Position?
named
Default Value
Accept Pipeline Input?
true (ByValue)
Accept Wildcard Characters?
false

-Path <String>

Aliases
Required?
true
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-Id <String>

Aliases
Required?
true
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-TemplateItem <TemplateItem[]>

Aliases
Required?
true
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-Template <String[]>

Aliases
Required?
true
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-Database <String>

Aliases
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

Notes

Help Author: Adam Najmanowicz, Michael West

Examples

EXAMPLE 1

The following example determines if the item inherits from the specified template.
1
$item = Get-Item -Path "master:\content\home"
2
Test-BaseTemplate -Item $item -Template "Sample/Sample Content"
3
4
# Alternatively you can use the Template Id
5
Test-BaseTemplate -Item $item -Template "{76036F5E-CBCE-46D1-AF0A-4143F9B557AA}"
Copied!
Last modified 2yr ago