We are looking for a Sitecore PowerShell script
using which we can assemble/add components directly to an SXA
page. I am able to add an SXA
page, then add a Container component
(under the page structure) to the page. But now I am not able to understand how to add any component under this Container Component
via the same script.
$newSitecorePageItem = New-Item -Path $($rootItem.ItemPath) -Name "Demo 1" -ItemType "/sitecore/templates/Project/Website/Page"
$renderingPath = "/sitecore/layout/Renderings/Feature/Experience Accelerator/Page Structure/Container"
$renderingItem = Get-Item -Database "master" -Path $renderingPath | New-Rendering -Placeholder "main"
Add-Rendering -Item $newSitecorePageItem -PlaceHolder "main" -Instance $renderingItem -Parameter @{ "Reset Caching Options" = "1" } -FinalLayout:$useFinalLayout
Now suppose I want to add a Splitter Row
inside this container and then further add other components into individual rows of Splitter Row
i.e Component A to row1 and Component B to row2. What placeholder should I write for these components? Please suggest.
Thanks & Many Regards, Lalit Joshi