You are here:   » Home » Documentation » Details » ZMS API » acc. to Objects » zmsobject » zmscontainerobject

zmscontainerobject.ZMSContainerObject

ZMSContainerObject is the abstract basic class from which all ZMS-container (ZMSRubrik, ZMSDocument) and special objects derive.

ZMSContainerObject.filteredChildNodes(REQUEST, meta_types=None)

BESCHREIBUNG:
For the current object gives back a sorted list of all visible (->isVisible) sub-ojects of the specified metatype.

EINGABE-PARAMETER:
REQUEST: the Http-Request Object.
meta_types[list|string]: Metatype of the sub-objects (optional); this can be a list of meta_types, the Meta-ID of a spec. object or one of the keywords PAGES or PAGEELEMENTS.

AUSGABE-PARAMETER:
nodes[list]: List of objects

BEISPIELE
[1]  List of all visible subobjects of the current object:
 filteredChildNodes(REQUEST)
[2]  List of all visible subobjects of type ZMSTextarea or ZMSDocument of the current object:
 filteredChildNodes(REQUEST,['ZMSTextarea','ZMSDocument'])
[3]  List of all visible subobjects of type PAGE (ZMSRubrik, ZMSDocument, etc.) of the current object:
 filteredChildNodes(REQUEST,PAGES)
[4]  Comma-seperated list of the IDs of all visible subobjects of typePAGE:
 <dtml-in "filteredChildNodes(REQUEST,PAGES)">
  <dtml-var id>
  <dtml-unless sequence-end>,</dtml-unless>
 </dtml-in>
[5]  Alternatively to filteredChildNodes(REQUEST,PAGES) getIndexNavElements(REQUEST) delivers only the subdocuments (standard and special documents) but not the subfolders; example for a comma-separated list of the short titles of all subdocuments:
 <dtml-in "getIndexNavElements(REQUEST)">
  <dtml-var "getTitlealt(REQUEST)">
  <dtml-unless sequence-end>,</dtml-unless>
 </dtml-in>


ZMSContainerObject.filteredTreeNodes(REQUEST, meta_types, order_by=None, order_Dir="asc", max_Len=None)

BESCHREIBUNG:
For the current object searches in the complete sub-tree for objects of the specified meta-type, orders them according to stated criteria and delivers the sorted list with the stated maximum length.

EINGABE-PARAMETER:
REQUEST: the Http-Request Object.
meta_types: meta-type of sub-objects; this can be a list of meta_types or one of the keywords PAGES or PAGEELEMENTS; this can also be the meta_id of a special document.
order_by: key of the attribute according to which shall be sorted.
order_Dir: kind of sorting (asc= ascending, desc= descending).
max_Len: maximum number of objects to be given back.

AUSGABE-PARAMETER:
nodes[list]: List of <Msobject>-objects

BEISPIELE
[1]  List of the three newest news within the WWW-site:
News are special documents with the meta_id='news'. The date of the news is stored in the attribute 'date' according to which it is ordered descendently ('desc'). The news text is read out of the attribute 'text'.
<dtml-with "getDocumentElement()">
 <table>
  <dtml-in "filteredTreeNodes(REQUEST,'news','date','desc',3)">
    <tr>
     <th>
      <a href="<dtml-var "getHref2IndexHtml(REQUEST)">">
       <dtml-var "getObjProperty('date',REQUEST)">
      </a>
     </th>
    </tr>
    <tr>
     <td>
      <dtml-var "getObjProperty('text',REQUEST)">
     </td>
    </tr>
  </dtml-in>
 </table>
</dtml-with>


ZMSContainerObject.getFirstPage(REQUEST)

BESCHREIBUNG:
Delivers the first start page of the content-tree (see below).

EINGABE-PARAMETER:
REQUEST: the Http-Request Object

AUSGABE-PARAMETER:
node[object]: Object


ZMSContainerObject.getIndexNavElements(REQUEST)

BESCHREIBUNG:
For the current object gives back a list of sub-documents (standard and special documents) for the index navigation in the content area (Template bodyContent_Index).

EINGABE-PARAMETER:
REQUEST: the Http-Request Object.

AUSGABE-PARAMETER:
nodes[list]: List of -Objects

BEISPIELE
[1]  Lists the short titles of all sub-documents comma-separately:
<dtml-in "getIndexNavElements(REQUEST)">
 <dtml-var "getTitlealt(REQUEST)">
 <dtml-unless sequence-end>,</dtml-unless>
</dtml-in>


ZMSContainerObject.getPrevPage(REQUEST)

BESCHREIBUNG:
Delivers the previous page of the content tree; None if there is no previous page (see below).

EINGABE-PARAMETER:
REQUEST: the Http-Request Object

AUSGABE-PARAMETER:
node[object]: Object


ZMSContainerObject.getNavElements(REQUEST, expand_tree=1)

BESCHREIBUNG:
For the current object gives back a list of objecs for the main navigation in the content area (template bodyContent_MacroNavigation):
- always all objects of the first level
- the parents of the current object (if expand_tree=1 incl. their siblings)
- all objects of the level below the current object

EINGABE-PARAMETER:
REQUEST: the Http-Request Object.
expand_tree[int]=1: expand siblings of the parents (optional)

AUSGABE-PARAMETER:
nodes[list]: List of -objects

BEISPIELE
[1]  Delivers an indented list of all short titles of elements of the main navigation:
 <dtml-in "getNavElements(REQUEST)">
  <dtml-in "_.range(0,getLevel())"> </dtml-in>
  <a href="<dtml-var "getHref2IndexHtml(REQUEST)">">
    <dtml-var "getTitlealt(REQUEST)">
  </a>
 </dtml-in>


ZMSContainerObject.getNextPage(REQUEST)

BESCHREIBUNG:
Delivers the next page of a content tree; None if there is no next page (see below).

EINGABE-PARAMETER:
REQUEST: the Http-Request Object

AUSGABE-PARAMETER:
node[object]: Object


ZMSContainerObject.getLastPage(REQUEST)

BESCHREIBUNG:
Delivers the last page of the content tree.

EINGABE-PARAMETER:
REQUEST: the Http-Request Object

AUSGABE-PARAMETER:
node[object]: Object

BEISPIELE
[1]  Site navigation:
 <dtml-let first="getFirstPage(REQUEST)"
              prev="getPrevPage(REQUEST)" 
              next="getNextPage(REQUEST)"
              last="getLastPage(REQUEST)">
   <a href="<dtml-var "first.getHref2IndexHtml(REQUEST)">">[First]</a>
   <dtml-if prev>
    <a href="<dtml-var "prev.getHref2IndexHtml(REQUEST)">">[Previous]</a>
   </dtml-if>
   <dtml-if next>
    <a href="<dtml-var "next.getHref2IndexHtml(REQUEST)">">[Next]</a>
   </dtml-if>
   <a href="<dtml-var "last.getHref2IndexHtml(REQUEST)">">[Last]</a>
 </dtml-let>


ZMSContainerObject.getLinkList(REQUEST)

BESCHREIBUNG:
For the current object from therein located Link-, Linkcolection- and File-objects delivers a list of internal and external links.

EINGABE-PARAMETER:
REQUEST: the Http-Request Object

AUSGABE-PARAMETER:
list: List of Dictionaries
src= Source (-Objekc; ZMSFile or ZMSLinkElement)
dst= Target (-Object; only for internal Links!)
url= URL of the target
title= Title
description= Description
internal= 0|1 for external/internal Links

BEISPIELE
[1]  Lists all links of a page:
 <dtml-in "getLinkList(REQUEST)" mapping>
  <a href="<dtml-var url>"
   <dtml-if src>
    <dtml-if "src.meta_type=='ZMSLinkElement' and 
              src.getObjProperty('attr_type',REQUEST)=='new'">
     target="_blank"
    </dtml-if>
   </dtml-if>>
   <dtml-var title>
  </a>
  <dtml-var description>
 </dtml-in>

REFERENZEN:





ZMSContainerObject.getTeaserElements(REQUEST)

BESCHREIBUNG:
Provides a list of all Teaser-elements of the current object. Also Teaser-elements are included that penetrate from a higher hierarchy-level into the current level.

EINGABE-PARAMETER:
REQUEST: the Http-Request object.

AUSGABE-PARAMETER:
nodes[list]: List of Teaser-elements


Table of contents: