简体   繁体   中英

Sitecore Powershell create new language version does not include layouts for final layout

I'm trying to use Sitecore Powershell extensions to add a new language version. I run a command like the following from the console: "Add-ItemVersion -Path "PATH" -TargetLanguage "LANGUAGE""

The New item gets created but the layouts on the "final layout" tabs are missing on the new version.

How do I achieve this?

The "Final Layout" is language and version specific, so it makes sense that it would be empty when creating a new language version. Some options you have:

  • Use Shared Layout instead, if you just want the same layout across languages.
  • Add additional SPE code to copy the Final Layout from the 'en' version, if you want the have different layout but provide a starting point.
  • You might be able to use Language Fallback on the Final Layout field, but I have not attempted this myself. But really, this is what the Shared Layout is intended to do.

More information on versioned layouts can be found in Sitecore documentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM