다음을 통해 공유


SharePoint 2013: Workaround: Cannot add web part to Community Portal page

Requirement: Customer wants to add a Content Editor web part to Community Portal page 

Problem: When user clicks on the Gear icon>> 'Edit Page', then clicks 'Add a Web Part' there is no response

 Workaround: Below is an out-of-the-box workaround. 

  1. Create a 'Web Part Page' (via
         SPD 2013 (SharePoint Designer 2013) or the GUI). 
              NOTE: It doesn't matter where this page lives, it will serve as
         nothing more than a place to create the Content Editor Web part and
         configure it to export to your Community Portal page.
  2. Add the Content Editor Web
         part to this 'Web Part Page' and configure it as you wish. (I added some
         text and a few hyperlinks.)
  3. Save this page.
  4. Open this page in SharePoint
         Designer 2013 and choose 'edit file'. Locate the Content editor web part
         code. The easiest thing to do is locate the tag
         <WebPartPages:ContentEditorWebPart and click on it. Now look towards
         the bottom right of SharePoint Designer and you will see a highlighted tab
         that says <WebPartPages:ContentEditor…>. Click on that tab, it will
         select all the code you need.
     
  1. Copy the code (crtl+c)

  2. Open the Community Portal in
         SharePoint Designer 2013

  3. Click on 'Edit home site page'

               

  4. Right-click on 'default.aspx' and choose 'New from Existing Page'

               

  5. This will create a copy of default.aspx called 'untitled.aspx'. Go to 'File>>Save As', and name
         it something like 'default2.aspx'.

  6. In the code, locate the tag
         <WpNs1:ExistingCommunitiesWebPart runat="server"
         Title=""…Place your cursor in front of it and hit 'Return'. This
         will give you some space to paste in the Content Editor Web Part
         code

               

  7. Paste the Content Editor code
         (ctrl+v)

  8. Click 'Save'

  9. Right-click on default2.aspx (or whatever you named this page) and choose 'Set as Home Page' (This will
         now set this new page as the default home page so that when users browse
         to your Community Portal via https://domain/sites/CommunityPortal ) it will automatically go
         to this page (in my example default2.aspx)

               

  10. Browse to your community
         portal and you will now see the Content Editor Web part there.           

              Note: I also deleted/commented out the search web part because it will now throw an
         error up at the top right

               

  11. Go back to the code for
         default2.aspx page (or whatever you named it) and look for the tag
         <spsswc:SearchBoxScriptWebPart, click on it. Just like before, a
         highlighted tab will appear on the bottom right corner of your screen.
         Click that tab to select the code you need to remove or comment out.

  12. Remove or comment out, then     Save. You should be good now.

Comments

  • Anonymous
    October 01, 2013
    That's nice, but how to search for communities from this site right now?

  • Anonymous
    May 02, 2014
    just use firefox or chrome... weird IE bug

  • Anonymous
    May 06, 2014
    After edit the content search webpart I cannot save. It is still the same around apply your workaround.

  • Anonymous
    July 27, 2018
    Thanks :)