Get-ItemField
Retrieves item fields as either names or fields or template fields.
Syntax
Get-ItemField [-Item] <Item> [-IncludeStandardFields] [-ReturnType <Name | Field | TemplateField>] [-Name <String[]>] [-Language <String[]>]
Get-ItemField [-Path] <String> [-IncludeStandardFields] [-ReturnType <Name | Field | TemplateField>] [-Name <String[]>] [-Language <String[]>]
Get-ItemField -Id <String> [-Database <String>] [-IncludeStandardFields] [-ReturnType <Name | Field | TemplateField>] [-Name <String[]>] [-Language <String[]>]
Detailed Description
Retrieves item fields as either names or fields or template fields.
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
Parameters
-IncludeStandardFields <SwitchParameter>
Includes fields that are defined on "Standard template"
-ReturnType <ReturnValue>
Determines type returned. The possible values include:
Name - strings with field names.
Field - fields on the item
TemplateField - template fields.
-Name <String[]>
Array of names to include - supports wildcards.
-Language <String[]>
Language that will be analysed. If not specified the current user language will be used. Globbing/wildcard supported.
-Item <Item>
The item to be analysed.
-Path <String>
Path to the item to be analysed.
-Id <String>
Id of the item to be analysed.
-Database <String>
Database containing the item to be analysed - can work with Language parameter to narrow the publication scope.
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.Item
Sitecore.Data.Templates.TemplateField
Sitecore.Data.Fields.Field
Notes
Help Author: Adam Najmanowicz, Michael West
Examples
EXAMPLE 1
Get list of names of non standard fields from /sitecore/content/home item
EXAMPLE 2
Get list of fields including standard fields from /sitecore/content/home item and list their Name, DisplayName, SectionDisplayName and Description in a table.
Related Topics
Last updated