0

I have created a new page layout inside my SharePoint 2013 enterprise wiki , then I opened the page layout using SharePoint designer 2013. But I cannot find a way to add an editable table to my page content rich text box. So that if users selects this page layout they will find a table that they can fill .?

The only option I find is that I can add a non-edible table , but what I need is to have an editable table that users can add data inside it ? so that I can force my page layout to have a table all the time..

Thanks

3
  • You would have to build something custom. You may want to look into something like adding an editable list view based on the current page, but it won't be simple. – Sam Sussman Aug 13 '14 at 16:14
  • can you explain your point in more details please ? what i am trying to achieve is to have an empty HTML table rendered automatically inside the rich text editor , when a user add/edit a wiki page. currently the users have to insert the table manually from the table tab.... – john Gu Aug 13 '14 at 17:00
  • sorry i mean from the "insert" tab – john Gu Aug 13 '14 at 17:07
1

Correct me if I'm wrong, but I suppose you want a default table inside of your rich text box everytime someone creates a page based on your page layout?

This page content rich text box is actually a field that's part of your content type. It's not connected to your page layout, so I'm not sure you can add default data into it.

I see three possible solutions.

  1. You add your default table through a workflow that automatically injects the table inside of the field.

  2. You use javascript to make sure there's always a table present inside of the rich text box

  3. You don't use the rich text box and create a webpart zone. This webpart zone can contain a content editor web part that by default already has a table inside of it. (This is what I would do, but be aware of limitations concerning putting data in webparts as opposed to page fields)

EDIT:

This is what I do when I want to create a page with some default content in it.

  1. Edit your page layout and add the webpart zone to where you want the default content to appear
  2. Create a page based on this page layout and edit it
  3. Add the content editor webpart to the webpart zone
  4. Edit this webpart so it contains the table you want with the correct formatting so it's at least visible when people create a new page based on the page layout. Do this untill you're satisfied with the result
  5. Open SharePoint designer and go to the library containing the page you just created and customize
  6. Right click it and select "Detach from Page Layout"
  7. Right click it again and select "Edit File in advanced mode"
  8. Go to your webpart zone, copy the webpart and put it in your PageLayout under the ZoneTemplate element inside of your webpart zone.

It should look like this:

<WebPartPages:WebPartZone>
<ZoneTemplate>INSERT YOUR WEBPART HERE</ZoneTemplate>
</WebPartPages:WebPartZone>
  1. Now, everytime someone creates a page based on your page layout, the table should be present.
7
  • but users can simply add a table inside the rich text editor. so what i need is to have this table added automatically inside the rich text editor when the user add/edit a wiki page. other questionfrom where i can install/import page layouts to my enterprise wiki site collection ?, as it seems that the enterprise wiki comes with three temples only ; basic page, basic project page + redirect page ? – john Gu Aug 13 '14 at 16:58
  • 1
    Yeah, it's as I thought. You need to follow one of the solutions I'm suggesting. I'd edit the pagelayout, add a web part zone and add a content editor webpart to it containing the table as it's contents. Do you know how to do this? – Christoffel de Gruyter Aug 13 '14 at 18:22
  • i did not implement such a requirement before, so can you provide links for some helping material for doing so .. thanks in advance.. – john Gu Aug 15 '14 at 1:34
  • 1
    I've added instructions to my initial post, please let me know if you have any additional questions – Christoffel de Gruyter Aug 15 '14 at 11:45
  • thanks for the reply , i will try it and let you know how things will go.. – john Gu Aug 17 '14 at 22:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.