Skip to main content Skip to navigation

Changing page properties

To edit the properties of a page, the process is identical to that of editing the content, but we do not need to include the <content> element. The properties that can be set (and their elements) are:

  • <sitebuilder:searchable> - whether the page is visible in search engines
  • <sitebuilder:visible> - whether the page is visible in the navigation list of its parent page
  • <sitebuilder:span-rhs> - whether the page should span its right hand side
  • <sitebuilder:deleted> - whether the page is marked as deleted (see Marking a page as deleted)
  • <sitebuilder:description> - the page's description, sometimes shown in Google results and on other Sitebuilder pages
  • <sitebuilder:keywords> - keywords for a page, used for search and categorisation
  • <sitebuilder:link-caption> - the link caption for a page (as used in local navigation)
  • <sitebuilder:page-heading> - the page heading
  • <sitebuilder:title-bar-caption> - the title bar caption
  • <sitebuilder:page-order> - the page (sort) order for a page, with lower numbers appearing first in local navigation
  • <sitebuilder:commentable> - whether the page allows comments
  • <sitebuilder:comments-visible-to-commenters-only> - whether comments for a page should only be visible to users who can post comments
  • <sitebuilder:layout> - the layout of an ID6 page

To set these properties, we simply need to set their values in an Atom document and PUT them to the Atom representation of the page:

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:sitebuilder="http://go.warwick.ac.uk/elab-schemas/atom">
  <sitebuilder:searchable>true</sitebuilder:searchable>
  <sitebuilder:visible>true</sitebuilder:visible>
  <sitebuilder:span-rhs>false</sitebuilder:span-rhs>
  <sitebuilder:description>My changed description</sitebuilder:description>
  <sitebuilder:keywords>api tests, atom, changed</sitebuilder:keywords>
</entry>

With this saved as editproperties.atom:

mat@augustus:~$ curl -i -X PUT --data-binary @editproperties.atom -H 'Content-Type: application/atom+xml' -u cuscav
   "https://sitebuilder.warwick.ac.uk/sitebuilder2/edit/atom/atom.htm?page=/fac/sci/chemistry/mynewpage&type=single"
Enter host password for user 'cuscav':

HTTP/1.1 200 OK
Date: Tue, 22 Mar 2011 10:58:59 GMT
Server: Penny
Content-Type: application/atom+xml;charset=ISO-8859-1
Content-Length: 1342
Vary: User-Agent

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:sitebuilder="http://go.warwick.ac.uk/elab-schemas/atom">
  <title>Here is my edited page</title>
  <link rel="collection" 
    href="https://sitebuilder.warwick.ac.uk/sitebuilder2/edit/atom/atom.htm?page=/fac/sci/chemistry/mynewpage&type=list" />
  <link rel="edit" 
    href="https://sitebuilder.warwick.ac.uk/sitebuilder2/edit/atom/atom.htm?page=/fac/sci/chemistry/mynewpage&type=single" />
  <link rel="alternate" 
    href="http://www2.warwick.ac.uk/fac/sci/chemistry/mynewpage" />
  <id>urn:uuid:094d43ed2eb4e006012edd22205e7f97</id>
  <content type="html">
    &lt;h2&gt;Hello World!&lt;/h2&gt;
    &lt;p&gt;Here is my newly created page&lt;/p&gt;
    &lt;p&gt;This is an extra line in the modified content of the page.&lt;/p&gt;
  </content>
  <author>
    <name>Mathew Mannion</name>
  </author>
  <updated>2011-03-22T10:53:37Z</updated>
  <published>2011-03-22T10:53:37Z</published>
  <sitebuilder:page-name>mynewpage</sitebuilder:page-name>
  <sitebuilder:searchable>true</sitebuilder:searchable>
  <sitebuilder:visible>true</sitebuilder:visible>
  <sitebuilder:deleted>false</sitebuilder:deleted>
  <sitebuilder:span-rhs>false</sitebuilder:span-rhs>
  <sitebuilder:description>A test of the ATOM representation of a page</sitebuilder:description>
  <sitebuilder:keywords>api tests, atom, changed</sitebuilder:keywords>
</entry>  

This is identical to the response for editing the content of a page.