Create and navigate publication structure

Because on the Hapag-Lloyd’s website every RedDot page needs to be published as a HTML and XML page synchronously, the top folder within publication structure correspond to these project variants.

The publication structure below uses folders per language code and below all main menu item of the website needs to be created. See the following sample:

—- career
—-direct_booking and so on

—- about_us
—- career
—-direct_booking and so on

Use the following jRQL statements to create and/or navigation through such a publication structure:

String logonGuid="0904ABF0E43443D2881FE7481339650E";
String sessionKey="490EC675042F4C5A8A6DF1ED63ADD7A6";
String projectGuid="268F46EF5EB74A75824856D3DA1C6597";

CmsClient client = new CmsClient(logonGuid);
Project project = client.getProject(sessionKey, projectGuid);

PublicationFolder rootFolder1 = project.getPublicationRootFolderByGuid(“publicationFolderGuid”);
PublicationFolder docRoot = project.getPublicationRootFolderByName(“docRoot”);

You can access the root folders (RedDot CMS did not offer a single root folder) the best way by name, but of course it’s possible to access them by GUID as well.

Use one of the following lines to create a subfolder and navigate down the publication structure.

PublicationFolder newChild = rootFolder1.createChildFolder("child folder name");
PublicationFolder child = rootFolder1.getChildByName("child name");

See the next article on how to update the published pages folder for all publication combinations of a package.

Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: