XII. Page Element Reference

Midgard uses pageelement records to override the style defined by style elements for a certain page, and optionally its children.

1. Page element Record Definition

A page element record contains information about a page element, the page it belongs to, an its inheritance.

Fields of a page element record

id

The id of the page element.

page

The id of the page record the page element belongs to.

name

The name of the page element

value

The content of the page element.

info

Contains set('inherit'). If inherit is set, the page element will also be valid for subpages of the page record with id page.

sitegroup

The id of the sitegroup the page element belongs to.

2. Page element Object Definition

This section describes the contents of pageelement objects. Most object parameters map directly to the record fields described above.

The functions listed within the object definition are the object methods that are available for the object. Usage information about those methods can be found in Object Methods.

/* Page element Object Prototype */

Class pageelement {

 var $N;      # Only with mgd_list_XXX functions.
 var $id;
 var $page;
 var $name'
 var $value;
 var $info;
 var $sitegroup;

  function fetch();   # Only with mgd_list_XXX functions.

  function create();
  function update();
  function delete();

  function createattachment();
  function updateattachment();
  function deleteattachment();
  function getattachment();
  function listattahcments();
  function openattachment();
  function serveattachement();

  function listparameters();
  function parameter();
  function searchparameters();

  function getsitegroup();
  function setsitegroup();


}
Table of Contents
mgd_copy_page_element — Copy a page element
mgd_create_page_element — Create a page element
mgd_delete_page_element — Delete a page element record
mgd_get_page_element — Get a page-element record
mgd_get_page_element_by_name — Get a page-element record by name
mgd_list_page_elements — List page elements
mgd_move_page_element — Move a page element
mgd_update_page_element — Update a page element record