Difference between revisions of "Sitemap"

Line 184: Line 184:
 
if ( is_it_a_special_page ( page_name, page_link ) == false ) {  // check if a page is a redirect or a special case
 
if ( is_it_a_special_page ( page_name, page_link ) == false ) {  // check if a page is a redirect or a special case
 
 
 +
// check how many "tiers" (  /  ) the page name has in order to nest it
 +
switch  ( (page_name.match( /\//g ) || []).length  ) { 
 +
 +
// this might be a hub, an unassigned page or a team page
 +
case 0: 
 +
if(page.substring(0,4) == "Team"){
 +
append_tier_one ( page_name, no_underscores_name, "#team_list") ;
  
switch  ( (page_name.match( /\//g ) || []).length  ) {  // check how many "tiers" (  /  ) the page name has in order to nest it
+
}
 +
else {
 +
append_tier_one ( page_name, no_underscores_name, "#organized_pages") ;
 +
}
  
case 0:  // this might be a hub or an unassigned page
 
append_tier_one ( page_name, no_underscores_name, "#organized_pages") ;
 
 
break;  
 
break;  
  
//case 1: //this page is likely to have a hub to append to
+
case 1: //this page is likely to have a hub to append to
// append_tier_two ( page_name, no_underscores_name, clean_name  );   
+
append_tier_two ( page_name, no_underscores_name, clean_name  );   
// break;
+
break;
  
 
//case 2: //this page might be a subpage inside a page in a hub list
 
//case 2: //this page might be a subpage inside a page in a hub list
Line 255: Line 263:
 
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  
// function append_tier_two (page_name, no_underscores_name, clean_name ) {
+
function append_tier_two (page_name, no_underscores_name, clean_name ) {
// page_id  = "map0"+page_name;
+
 
// $("#"+page_id.substring(0, page_id.indexOf("/") ) ).append("<li><a href='"+page_name+"'> "+no_underscores_name.substring( page_id.indexOf("/") -3, page_id.length) +"</a>  <ol id='"+clean_name+"'>  </ol></li>");
+
$("#Sitemap0"+page_name.substring(0, page_id.indexOf("/") ) ).append("<li><a href='"+page_name+"'> "+no_underscores_name.substring( page_id.indexOf("/") -3, page_id.length) +"</a>  <ol id='"+clean_name+"'>  </ol></li>");
  
 
// }
 
// }

Revision as of 21:08, 20 April 2017

MENU

SITEMAP

iGEM is a multifaceted competition with many different components. Our websites have a lot of information, from requirements of the competition to tips on how make fundraising easier. This page is here to help you navigate our site and make sure you have access to all of its content.

LIST
TEAMS
HQ

TEAMS