Skip to content

Instantly share code, notes, and snippets.

@AdamNaj
Created August 30, 2017 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdamNaj/df0881fb33d1a13b89df87609557bacd to your computer and use it in GitHub Desktop.
Save AdamNaj/df0881fb33d1a13b89df87609557bacd to your computer and use it in GitHub Desktop.
Set a layout for a device across multiple pages
# branch that should be replaced - change the path
$items = Get-ChildItem master:\content\home2 -WithParent
# layout I want to set on my items
$layout = Get-Item 'master:\layout\Layouts\Foundation\Experience Accelerator\MVC\MVC Layout'
# Device on which I want to set it
$device = Get-LayoutDevice "Mobile"
foreach($item in $items){
Set-Layout -Item $item -Device $Device -Layout $layout
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment