tolppa
asked on
SP2013 Sandbox: How to add listview webpart to page?
I wanted to create a module to provision an aspx page with few listview webparts. I have no problem if list exist in page, but seems like this does not work if list are provisioned from the same solution. Perhaps Sharepoint randomizes guids or something like that. Any Ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Interesting, seems like I can inject
to my layout.
<div class="ms-rtestate-read ms-rte-wpbox" contentEditable="false"><div class="ms-rtestate-read 46113482-da36-45a5-bbac-e1e1771c19fa" id="div_46113482-da36-45a5-bbac-e1e1771c19fa"></div><div style='display:none' id="vid_46113482-da36-45a5-bbac-e1e1771c19fa"></div></div>
to my layout.
ASKER
No problem wiht single view, but seems like I am not able to add multiple views to different columns (table cells). SharePoint designer allow this.
ASKER
I created module that should create my page with views. Not too hard:
Open in new window
Unfotunately I need more complex layout which can be created with:
Open in new window
I can see layout work correctly, but how do I add my views to page? Something like:
Footer: <View List="Lists/MyList" BaseViewID="2" Type="HTML" WebPartZoneID="wpz" WebPartOrder="4" ID="g_46113482_da36_45a5_b
Left column (would be another view): <View List="Lists/MyList" BaseViewID="2" Type="HTML" WebPartZoneID="wpz" WebPartOrder="4" ID="g_46113482_da36_45a5_b
(http://blog.mastykarz.nl/inconvenient-provisioning-web-parts-wiki-pages-sandboxed-solutions/)