I add a webpart page via powershell like this:
$idLayout = 2
$list = $oSP.GetList( $sList )
$xml = "<?xml version=""1.0"" encoding=""UTF-8""?><Method ID=""0,NewWebPage""><SetList Scope=""Request"">"
$xml += $list.ID
$xml += "</SetList><SetVar Name=""Cmd"">NewWebPage</SetVar><SetVar Name=""ID"">New</SetVar><SetVar Name=""Type"">WebPartPage</SetVar><SetVar Name=""WebPartPageTemplate"">"
$xml += $idLayout
$xml += "</SetVar><SetVar Name=""Overwrite"">true</SetVar><SetVar Name=""Title"">"
$xml += $sName
$xml += "</SetVar></Method>"
$result = $oSP.ProcessBatchData($xml)
It works, but the webparts have huge padding (see screenshot). How can I have the normal padding for webpart pages w/o hacking CSS?
Thanks, Juergen

0 commentaires:
Enregistrer un commentaire