// TODO: remove this before you go live
request.element.isStatic = 0;
//startTime = getTickCount();
// this is the current subsite (if it exists)
curSubsiteAry = attributes.elementInfo.elementData.propertyValues;
// this will eventually contain all of the parents (and this subsite if it exists)
allSubsiteAry = curSubsiteAry;
loadParents = true;
if ( arrayLen(curSubsiteAry) gt 0 and curSubsiteAry[1].values.parentID eq 0 )
loadParents = false;
// if this subsite isn't a parent walk up until we get a parent
if ( loadParents )
{
// create parents list (minus current)
parentsList = listDeleteAt(request.subsite.subsiteInheritance, 1);
// loop through parents til we get to a parent with the parentID = 0
for( itm = 1; itm lte listLen(parentsList); itm = itm + 1 )
{
parentSubsiteAry = application.ohsuNav.navElementDAO.getBySubsiteID(listGetAt(parentsList, itm));
// if there is a parent then make sure this page is in this subsite as a child
if( arrayLen(parentSubsiteAry) gt 0 )
arrayAppend(allSubsiteAry, parentSubsiteAry[1]);
//
if( arrayLen(parentSubsiteAry) and parentSubsiteAry[1].values.parentID eq 0 )
break;
}
}
// sort the array to prepare for rendering
allSubsiteAry = application.ohsuNav.ceData.arrayOfCEDataSort(allSubsiteAry, "subsiteID", "asc", "numeric");