lib/dox-foundation.js
function buildStructureForFile(file) {
  var names = [];
  var targetLink;

  if (file.dox.length === 0) { return false; }

  file.dox.forEach(function(method){
    if (method.ctx && !method.ignore) { names.push(method.ctx.name); }
  });

  // How deep is your love?
  // If the splitted currentFile (the file we are currently rendering) path got one folder
  // in the path or more, add ../ for each level found
  if(file.currentFile && file.currentFile.split(path.sep).length > 1 ){
    // Depth of current file
    var depth = file.currentFile.split(path.sep).length,
    // Create a prefix with n "../"
    prefix = new Array(depth).join('../');
    // Set up target link with prefix
    targetLink = prefix + file.targetFile;
  } else {
    // Link does not have to be altered
    targetLink = file.targetFile;
  }

  return {
    source: {
      full: file.sourceFile,
      dir: path.dirname(file.sourceFile),
      file: path.basename(file.sourceFile)
    },
    target: file.targetFile,
    methods: names,
    link : targetLink
  };
}
function buildStructureForFile(file) {
  var names = [];
  var targetLink;

  if (file.dox.length === 0) { return false; }

  file.dox.forEach(function(method){
    if (method.ctx && !method.ignore) { names.push(method.ctx.name); }
  });

  // How deep is your love?
  // If the splitted currentFile (the file we are currently rendering) path got one folder
  // in the path or more, add ../ for each level found
  if(file.currentFile && file.currentFile.split(path.sep).length > 1 ){
    // Depth of current file
    var depth = file.currentFile.split(path.sep).length,
    // Create a prefix with n "../"
    prefix = new Array(depth).join('../');
    // Set up target link with prefix
    targetLink = prefix + file.targetFile;
  } else {
    // Link does not have to be altered
    targetLink = file.targetFile;
  }

  return {
    source: {
      full: file.sourceFile,
      dir: path.dirname(file.sourceFile),
      file: path.basename(file.sourceFile)
    },
    target: file.targetFile,
    methods: names,
    link : targetLink
  };
}
function buildStructureForFile ( file ) { var names = [ ] ; var targetLink ; if ( file . dox . length === 0 ) { return false ; } file . dox . forEach ( function ( method ) { if ( method . ctx && ! method . ignore ) { names . push ( method . ctx . name ) ; } } ) ; // How deep is your love? // If the splitted currentFile (the file we are currently rendering) path got one folder // in the path or more, add ../ for each level found if ( file . currentFile && file . currentFile . split ( path . sep ) . length > 1 ) { // Depth of current file var depth = file . currentFile . split ( path . sep ) . length , // Create a prefix with n "../" prefix = new Array ( depth ) . join ( '../' ) ; // Set up target link with prefix targetLink = prefix + file . targetFile ; } else { // Link does not have to be altered targetLink = file . targetFile ; } return { source : { full : file . sourceFile , dir : path . dirname ( file . sourceFile ) , file : path . basename ( file . sourceFile ) } , target : file . targetFile , methods : names , link : targetLink } ; }
Return a list of methods for the side navigation

@param {Object} file
@return {Object} Object formatted for template nav helper
@api private
Return a list of methods for the side navigation