Seeking Sitemap plugin for Content 0.5
- You cannot open a new topic into this forum
- Guests cannot post into this forum
msg# 1
Tried to make it myself but dont get the tree displayed correctly. All Menus and Submenus are being showed, but im not able to get them sorted in the proper order: Menu -> Submenu.
The corresponding fields:
- storyid (the id of the content itself)
- parent_id (contains the parent content)
- blockid (forces the sorting, else its sorted by storyid)
- title (topic of the content)
Hope that someone can help me as i didnt find an equal piece of code which matches in the already available plugins.
Thanks in advance.
Votes:7
Average:8.57
msg# 1.1
Below is the code i was using so far:
<?php
function b_sitemap_content(){
$db =& Database::getInstance();
$myts =& MyTextSanitizer::getInstance();
$result = $db->query("SELECT storyid, blockid, parent_id, title FROM ".$db->prefix("content")." order by storyid, blockid");
$ret = array() ;
while(list($storyid, $blockid, $parent_id, $title) = $db->fetchRow($result)){
$ret["parent"][] = array(
"id" => $storyid,
"title" => $myts->makeTboxData4Show($title),
"url" => "index.php?id=$storyid"
);
}
return $ret;
}
?>
Votes:16
Average:3.75