I've got a script i'm using on a few pages that is supposed to match its title somewhere in the body of one of the sub pages and put each page title in a list that it exists on.
so far it is doing that however it will list some pages 2-3 times and im lost as to why, could the pages have an alias that i don't see?
This is version 10.1 running on Windows Server 2008
Code:// page title has to be the hostname of the robot var filterRobot = page.title; // searches subpages of the app list var reportArea= wiki.getpage("Software_Documentation/Network_Services/Monitoring/Compuware_Vantage/Active_User_Monitoring/Active_Monitored_Applications_List"); // initializes subpages array var reportPagePathList = []; <ul> // Iterate through every subpage of the reportArea page foreach (var reportPage in reportArea.subpages) { if ( string.match(reportpage.text, filterRobot)){ let reportPagePathList ..= [ reportPage.path ]; } // Go through each page in turn foreach(var pagePath in reportPagePathList) { // Display a link to page <li> wiki.link(pagePath); </li> } } </ul>


Reply With Quote
