|
| 1 | +--- |
| 2 | +title: Term mapping during cross site page transformation |
| 3 | +description: Explains how to the default term mapping works when transforming pages + also explains how to use a custom term mapping file |
| 4 | +ms.date: 03/06/2020 |
| 5 | +ms.prod: sharepoint |
| 6 | +localization_priority: Priority |
| 7 | +--- |
| 8 | + |
| 9 | +# Term mapping during page transformation |
| 10 | + |
| 11 | +Term mapping is the mechanism that translates managed metadata terms in the source environment to an applicable term in the target environment. The cases in where term mapping applies are: |
| 12 | + |
| 13 | +- You're transforming from on-premises SharePoint to SharePoint Online |
| 14 | +- You're doing a cross site transformation (e.g. from classic publishing portal to a modern intranet) in SharePoint Online |
| 15 | + |
| 16 | +Term mapping will not be used when: |
| 17 | + |
| 18 | +- The source and target are pointing to the same termset id |
| 19 | +- When you're doing an in-place transformation (source and target page live in the same site) |
| 20 | + |
| 21 | +## How does term mapping work |
| 22 | + |
| 23 | +Term mapping will automatically try to find the equivalent term in SharePoint Online for the term used in the source page and it can do this in two manners: |
| 24 | + |
| 25 | +- Automatic mapping: term mapping will try to find an equivalent term by checking if the same term group, termset and term path can be found in the target term store |
| 26 | +- Custom mapping based upon a file: using a mapping file you can specify a target term for a given source term |
| 27 | + |
| 28 | +## Turning off the automatic mapping |
| 29 | + |
| 30 | +If you don't want term mapping to happen you can disable it via the `-SkipTermStoreMapping` flag in PnP PowerShell or via the `SkipTermStoreMapping` attribute of the .Net page transformation configuration objects (`PageTransformationInformation` and `PublishingPageTransformationInformation`). |
| 31 | + |
| 32 | +## Custom term mapping |
| 33 | + |
| 34 | +If you don't like or cannot use the automatic term mapping then there's the option to specify a term mapping file. A term mapping file is a simple CSV file listing source term and target term as shown in below snippet |
| 35 | + |
| 36 | +```Text |
| 37 | +SourceTermGroup|SourceTermSet|SourceTerm,TargetTermGroup|TargetTermSet|TargetTerm |
| 38 | +SourceTermGroup|SourceTermSet|SourceTerm|SourceChildTerm1|SourceChildTerm2,TargetTermGroup|TargetTermSet|TargetTerm|TargetChildTerm1|TargetChildTerm2 |
| 39 | +f0b1b6aa-b00b-4198-b8dd-ef4393e3ad05,fec05391-6a39-4ad5-a2a1-a01020d94efd |
| 40 | +``` |
| 41 | + |
| 42 | +Some things to note: |
| 43 | + |
| 44 | +- You can either choose a mapping based upon a path (a | delimited string of term labels) or choose to define the mapping based upon source and target term id's |
| 45 | +- If you're transforming from SharePoint 2010 then you'll need to specify **DEFAULT** as source term group name |
| 46 | + |
| 47 | +Creating the mapping file is the first step, to actually use it you need to specify the file via the `TermMappingFile` parameter to the `ConvertTo-PnPClientSidePage` cmdlet if you're using PnP PowerShell. If you're using .Net then you can specify the file via the `TermMappingFile` attribute of the .Net page transformation configuration objects (`PageTransformationInformation` and `PublishingPageTransformationInformation`). |
0 commit comments