You are here

Surf objects

Surf objects define website parts and describe how they fit together to build the complete web application structure.

Objects describe things like pages, page hierarchy, chrome, or components that are reused across many pages. XML files define objects that are generally short. A single Surf application will have many XML files to define its objects. When Surf starts up, it looks for all these small XML fragments and gathers them to form a complete registry of all of the objects.

Example of the XML for a Page object:

<?xml version='1.0' encoding='UTF-8'?>
   <title>My First Page</title>
   <description>This is an example of the XML for a Page</description>


A Spring project generally maintains these XML files as part of its project resources. They can reside under the WEB-INF directory or inside the classpath. Users can also manage these files inside the Alfresco Community Edition server, where XML files can be individually managed, authorized, and approved as part of a lifecycle process. Once approved, these files are available to the Surf application.

Here are a few examples of the various presentation objects that Surf provides:
  • Chrome-application borders for regions and components
  • Components-binds web scripts into templates and pages
  • Content Instance-points to pages or templates to use when rendering content types (cm:content or my:article)
  • Page - a navigable location within a site
  • Page Type - indirection to non-navigable locations, such as a login page
  • Template Instance - configuration for dynamic templates
  • Theme - settings that define the site experience

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.