本文整理汇总了PHP中common_node::getFullPathDetail方法的典型用法代码示例。如果您正苦于以下问题:PHP common_node::getFullPathDetail方法的具体用法?PHP common_node::getFullPathDetail怎么用?PHP common_node::getFullPathDetail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common_node
的用法示例。
在下文中一共展示了common_node::getFullPathDetail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateSingleURIFullPath
/**
* generate single
*/
function generateSingleURIFullPath($node_data)
{
require_once 'models/common/common_node.php';
$Node = new common_node();
$fp = $Node->getFullPathDetail($node_data['id']);
$fullpath = "";
foreach ($fp as $f) {
if ($f['node_group'] == 'page') {
if ($f['uri_title'] != '') {
$title = $this->cleanTitle($f['uri_title']);
} else {
$title = $this->cleanTitle($f['title']);
}
// for blog/news pages prepend date
if ($f['node_controller'] == 'news') {
$title = preg_replace("/-/", "/", substr($f['created'], 0, 10)) . "/{$title}";
}
if ($fullpath == '') {
$fullpath = $title . $fullpath;
} else {
$fullpath = $title . str_replace('/', $this->conf['delimiter'], $fullpath);
}
if ($this->conf['hash'] == true) {
$fullpath = '/' . sprintf('%08X', crc32($fullpath));
} else {
$fullpath = '/' . $fullpath;
}
}
if (!preg_match("/" . $this->conf['append'] . "\$/", $fullpath)) {
$fullpath = $fullpath . $this->conf['append'];
}
}
return $fullpath;
}