How do I put a configured CQWP into the page layout so that its deployed configured?
<div class="news">
<h3>News</h3>
<ul>
<WebPartPages:WebPartZone id="g_0A8F3D3F6开发者_运维问答B3B43D4BB9FC39E55892F0C" runat="server" title="Zone 1"><ZoneTemplate>
<NewsWP:NewsWP runat="server" id="NewsWP"></NewsWP:NewsWP>
</ZoneTemplate></WebPartPages:WebPartZone>
</ul>
</div>
I created a custom control called NewsWP and I need to somehow insert the configured webpart into that area but don't know how. Can someone please show me the right approach to take.
One way to resolve this is to deploy the web part to
- Deploy webpart to SharePoint Server.
- Within SharePoint or SPD edit add the webpart to the desired page.
- Save the Site as a template.
- Download the WSP from SharePoint and open Import into Visual Studio.
- Locate the desired sections that configure the page and add them to your project and modify as desired.
This is the process we use and it has worked fairly well for us. We use small projects to develop our custom components, use SharePoint or SPD to configure the deployed components and then save the site as a template to use for site creation.
精彩评论