Editing lists and containers

From the  RQL point of view RedDot CMS handle lists and contains very similar. Therefore I implemented the common functionality into the superclass MultiLink.

You can get a multi link on a page directly. See some examples regarding multi link handling on a page.

Page currentPg = project.getPageById(“4711”);
MultiLink multiLink = currentPg.getMultiLink(“multiLinkTemplateElementName”);
List multiLinks = currentPg.getMultiLinks();
boolean includeReferences = false;
List<MultiLink> multiLinks2 = currentPg.getMultiLinks(includeReferences);

List<MultiLink> linksToThisPage = currentPg.getMultiLinksToThisPage();
MultiLink mainMultiLink = currentPg.getMainMultiLink();

The first block let you get a multi link which is element of page currentPg. The second block will return multi links which reside on other pages. Please refer to javadoc for class Page and search for MultiLink on doc page.

After you know how to get a multi link I want to explain some of the functionality. The following methods can be called on instances of List and Container in the same way.

A multi link offers methods from the following areas:

  • create and connect a page (5 methods)
  • connect to an existing page (4 methods)
  • move child pages from and to other multi links (not a standard method in RedDot CMS, but often needed) (10 methods)
  • disconnect child pages (4 methods)
  • access children itself and lists of child page attribute values (5 methods)
  • referencing (3 methods)
  • sort child pages by several criteria (11 methods)
  • link and unlink workflow, authorisation and publication packages (5 methods)
  • pre-assigned content class handling (e.g. check if content class is allowed or return all not allowed children) (6 methods)

For every area there are several methods available to address specific needs. Please get your own impression and examine the javadoc for class MultiLink. Only the subclass List is of further interest. It offers functions for target container editing in addition.

Post a comment or leave a trackback: Trackback URL.

Comments

  • dave  On 25. November 2009 at 8:02 pm

    Just discovered your website and API and it seems awesome. I’m going to be downloading and playing with it some more.

    I’m running CMS 10.

    • Frank  On 2. December 2009 at 3:16 pm

      hi dave, don’t hesitate to contact me, if you need help or if you have any questions. frank

Leave a reply to Frank Cancel reply