Prev | Current Page 470 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

io.File.getContent(getPageFile());
else
return alternative;
}
public function getTitle() : String
{
if(uri == ROOT_PAGE)
return HOME_TITLE;
else
return StringTools.urlDecode(uri.substr(uri.lastIndexOf(???/??™, 0) + 1));
}
public function getBreadcrumbLinks()
{
var list = new Array < LinkItem > ();
if(uri != ROOT_PAGE)
{
var path = getPageFile();
while(path.length > dir.length)
{
if(FileSystem.exists(path))
list.unshift({ title : titleFromPath(path), uri : uriFromPath(path) });
else
list.unshift({ title : titleFromPath(path), uri : null });
path = path.substr(0, path.lastIndexOf(???/??™));
if(path == dir)
break;
path += FILE_EXTENSION;
}
}
(continued)
244
Part II: Server Side, JavaScript, and Flash; Oh My!
list.unshift({ title : HOME_TITLE, uri : ROOT_URI });
return list;
}
private function getPageFile() : String
{
return dir + uri + FILE_EXTENSION;
}
private function getPageDirectory() : String
{
return dir + getPageNamespace();
}
private function getPageNamespace() : String
{
return uri.


Pages:
458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482