Location: PHPKode > projects > Charray's CMS > ccms/module/title.php
<?php

// Charray's CMS (CCMS) Version 0.9.1
//
// Copyright (c) 2007, Kinson Chan
// charray[at]gmail.com / kchan[at]cs.hku.hk
// All rights reserved.
//
// Please refer to LICENSE.txt coming with this package for
// terms and conditions for redistribution and reuse.

if (!defined("CCMS_IN")) {
	die();
}

function ccms_module_title($file) {
	global $ccms_title;
	global $ccms_path;
	$result['title'] = $ccms_title;
	$result['content'] = ccms_module_title_menu(ccms_ancestors_menu($ccms_path));
	return $result;
}

function ccms_module_title_menu($menu) {
	global $ccms_controller_url;
	$result = '';
	$separator = '&nbsp;&gt;&nbsp;';

	foreach ($menu as $path => $info) {
		$path = str_replace('%2F', '/', urlencode($path));
		$info['title'] = htmlentities($info['title'], ENT_COMPAT, 'UTF-8');
		$result .= "$separator<a href=\"$ccms_controller_url$path\">$info[title]</a>\n";
	}
	$result = substr($result, strlen($separator));
	$result = "$result";
	return $result;
}

?>
Return current item: Charray's CMS