if (this.allowdefaultlang != null) {
addWarning("Attribute \"allowdefaultlang\" is deprecated and inoperable since OpenWGA 5.1");
}
WGContent relContent = this.getTMLContext().content();
// IF the relContent is a dummy, use the first released content of this database
if (relContent.isDummy()) {
relContent = relContent.getDatabase().getFirstReleasedContent((String) getTMLContext().meta("language"), true);
if (relContent == null) {
addWarning("No content in context and cannot find released content of language " + getTMLContext().meta("language") + " in the current database", true);
return;
}
}
String theRole = this.getRole();
String type = status.navType;
if (type.equals("children")) {
navigator = createContentNavigator(theRole, WGContent.DISPLAYTYPE_NAVIGATOR);
WGStructEntryList childEntries = relContent.getStructEntry().getChildEntries();
status.contentList = WGContentList.create(navigator.collectRelevantContents(childEntries));
}
else if (type.equals("siblings")) {
navigator = createContentNavigator(theRole, WGContent.DISPLAYTYPE_NAVIGATOR);
WGStructEntryList siblingEntries = relContent.getStructEntry().getSiblingEntries();
status.contentList = WGContentList.create(navigator.collectRelevantContents(siblingEntries));
}
else if (type.equals("parent") || type.equals("parents")) {
navigator = createContentNavigator(theRole, WGContent.DISPLAYTYPE_NAVIGATOR);
WGStructEntryList parentEntries = relContent.getStructEntry().getParentEntry().getSiblingEntries();
status.contentList = WGContentList.create(navigator.collectRelevantContents(parentEntries));
}
else if (type.equals("path")) {
navigator = createContentNavigator(theRole, WGContent.DISPLAYTYPE_NAVIGATOR);
status.contentList = this.getPathListFor(relContent, navigator);
}
else if (type.equals("sitemap")) {
navigator = createContentNavigator(theRole, WGContent.DISPLAYTYPE_SITEMAP);
status.contentList = this.getSitemapListFor(relContent, navigator, this.stringToBoolean(this.getAllareas()));
}
else if (type.equals("languages")) {
navigator = createContentNavigator(theRole, WGContent.DISPLAYTYPE_NONE);
status.contentList = this.getLanguagesListFor(relContent, navigator, this.stringToBoolean(this.getAlllanguages()));
}
else if (type.equals("areas")) {
navigator = createContentNavigator(theRole, WGContent.DISPLAYTYPE_NAVIGATOR);
status.contentList = this.getAreasListFor(relContent, navigator);
}
else if (type.equals("versions")) {
status.contentList = relContent.getStructEntry().getAllContent(true);
}
else {
throw new TMLException("Unknown navigator type: " + type, true);
}