jeudi 4 décembre 2014

Displaying page contents (including webparts) on aggregation page [Sharepoint 2010]



CASE: Publisher can dynamically create pages in document library. Single page can have webparts embedded inside body text field. We have archive page which should aggregate all those pages and display them one under the other including webparts. In order to do it, we have a caml query which takes body of all pages and in user control we are creating html using repeater and eval function. As an output we get rendered just text of each page without webparts. Html output code for a single page with webpart looks as follow:



<p>body test</p> <div class="ms-rtestate-read ms-rte-wpbox"><div unselectable="on" class="ms-rtestate-notify ms-rtestate-read dd3ab381-9fbc-457c-8eba-3c75ad29f5fd" id="div_dd3ab381-9fbc-457c-8eba-3c75ad29f5fd"></div> <div unselectable="on" id="vid_dd3ab381-9fbc-457c-8eba-3c75ad29f5fd" style="display:none"></div></div> <p><br /></p>


Q: How to render webparts along with the rest of the (styled) content using a repeater?








0 commentaires:

Enregistrer un commentaire