Sorry, we found 0 results. Please try another query.
Showing max 10 of results

Publish a page with onet.xml as “published”

If you ever tried to publish one or more pages with your site definition (by onet.xml), you see in Visual Studio (with the SharePoint XSD schemas selected) only one valid value for the “Level” attribute which is “Draft”:

image

But for this attribute you can choose between every value of the SPFileLevel enum. So for publishing the page automatically, set the Level to “Published”. Thats it.

If you already know how to enable XSD schema validation and IntelliSense support stop reading here.

Enable Schema Validation:

  1. Open your xml file, e.g. onet.xml (works with all SharePoint related xml files)
  2. In the property pane, click the ellipsis next to the “Schemas” property
  3. Add the wss.xsd. This file is located in the 12\Template\XML directory
  4. Now add the following xml Namespace attribute to the root element (here Project in onet.xml):

Now you should have IntelliSense and schema validation enabled.

Leave a comment




Loading...