Get-ItemTemplate
Returns the item template and its base templates.
Syntax
Get-ItemTemplate [-Item] <Item> [-Recurse]
Get-ItemTemplate [-Path] <String> [-Recurse]
Get-ItemTemplate -Id <String> [-Database <String>] [-Recurse]
Detailed Description
The Get-ItemTemplate command returns the item template and its base templates.
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
Parameters
-Recurse <SwitchParameter>
Return the template the item is based on and all of its base templates.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-Item <Item>
The item to be analysed.
Aliases | |
---|---|
Required? | true |
Position? | 1 |
Default Value | |
Accept Pipeline Input? | true (ByValue, ByPropertyName) |
Accept Wildcard Characters? | false |
-Path <String>
Path to the item to be analysed.
Aliases | |
---|---|
Required? | true |
Position? | 1 |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-Id <String>
Id of the item to be analysed.
Aliases | |
---|---|
Required? | true |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-Database <String>
Database containing the item to be analysed - required if item is specified with Id.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Sitecore.Data.Items.Item
Outputs
The output type is the type of the objects that the cmdlet emits.
Sitecore.Data.Items.TemplateItem
Notes
Help Author: Adam Najmanowicz, Michael West
Examples
EXAMPLE 1
Get template of /sitecore/conent/home item
EXAMPLE 2
Get template of /sitecore/conent/home item and all of the templates its template is based on then format it to only show the template name, path and Key
Related Topics
Last updated