Development » API Functions » Document Functions

Etomite API - document based functions

Document based 

getAllChildren($id=0, $sort='menuindex', $dir='ASC', $fields='id, pagetitle, longtitle, description, parent, alias', $limit="")

  // returns a two dimensional array of $key=>$value data for all existing documents regardless of activity status
  // $id = id of the document whose children have been requested
  // $sort = the field to sort the result by
  // $dir = sort direction (ASC|DESC)
  // $fields = comma delimited list of fields to be returned for each record
  // $limit = maximun number of records to return (default=all)

getActiveChildren($id=0, $sort='menuindex', $dir='', $fields='id, pagetitle, longtitle, description, parent, alias', $limit="")

  // returns a two dimensional array of $key=>$value data for active documents only
  // $id = id of the document whose children have been requested
  // $sort = the field to sort the result by
  // $dir = sort direction (ASC|DESC)
  // $fields = comma delimited list of fields to be returned for each record
  // $limit = maximun number of records to return (default=all)

getDocuments($ids=array(), $published=1, $deleted=0, $fields="*", $where='', $sort="menuindex", $dir="ASC", $limit="")

  // Modified getDocuments function which includes LIMIT capabilities - Ralph
  // returns $key=>$values for an array of document id's
  // $id is the identifier of the document whose data is being requested
  // $fields is a comma delimited list of fields to be returned in a $key=>$value array (defaults to all)

getDocument($id=0, $fields="*")

  // returns $key=>$values for a specific document
  // $id is the identifier of the document whose data is being requested
  // $fields is a comma delimited list of fields to be returned in a $key=>$value array (defaults to all)

getPageInfo($id=-1, $active=1, $fields='id, pagetitle, description, alias')

  // returns a $key=>$value array of information for a single document
  // $id is the identifier of the document whose data is being requested
  // $active boolean (0=false|1=true) determines whether to return data for any or only an active document
  // $fields is a comma delimited list of fields to be returned in a $key=>$value array

getParent($id=-1, $active=1, $fields='id, pagetitle, description, alias, parent')

  // returns document information for a given document identifier
  // $id is the identifier of the document whose parent is being requested
  // $active boolean (0=false|1=true) determines whether to return any or only an active parent
  // $fields is a comma delimited list of fields to be returned in a $key=>$value array


Hosting Costs Generously Provided By:
Hydraulikservice | Link Text 2 | Link Text 3 | Link Text 4 | Link Text 5
Link Text 6 | Link Text 7 | Link Text 8 | Link Text 9 | Link Text 10