Created
August 30, 2017 15:39
-
-
Save AdamNaj/df0881fb33d1a13b89df87609557bacd to your computer and use it in GitHub Desktop.
Set a layout for a device across multiple pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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