headhunter
Posts: 130
|
| Posted: 08/24/2008, 1:33 PM |
|
Hello,
does anyone already implemented the Yahoo Treeview in a page to transform a nested unordered list into a tree?
I'm a bit stuck on this one...
http://developer.yahoo.com/yui/treeview/
Thanks!
|
 |
 |
REVENSE
Posts: 46
|
| Posted: 10/21/2008, 6:25 AM |
|
hai hunter,
u can use jquery.treeview its more easy to use, i think :). u only made some modification after u build menu from ccs4 builder.
here is the step :
1. build menu from menu builder and set mode to vertical tree
2. on html, include this tag javascript
<link href="jquery.treeview.css" type="text/css" rel="stylesheet">
<script src="jquery.min.js" type="text/javascript"></script>
<script src="jquery.cookie.js" type="text/javascript"></script>
<script src="jquery.treeview.js" type="text/javascript"></script>
<script src="demo.js" type="text/javascript"></script>
3. before tag /body, insert this script
<script type="text/javascript">
$(document).ready(function(){
$("#treemenu1").treeview({
collapsed: true,
animated:"normal",
persist: "location"
});
});
</script>
4. and betwen tag Div u must modify and delete some tag that ccs4 was generete, here the example
// modify class and add style or delete
<div class="MenuStyle" id="navMenuContainer" style="width:200px" >
<ul id="treemenu1" class=" filetree treeview"> // << == change
//
<!-- BEGIN Item -->
<!-- BEGIN OpenLevel -->
<ul class="level{Menu1:Item_Level}">
<!-- END OpenLevel -->
// add tag span class="file" before a href
<li {Menu1:DefaultItem}><span class="file"><a href="{ItemLink_Src}" class="{Menu1:Submenu}" target="content" title="{Menu1:Title}">{ItemLink}</a></span>
5. Finish
Note : before that use must download jquery packet :)
i hope it can help u,, before that sorry for may bad english 
Rev
|
 |
 |
headhunter
Posts: 130
|
| Posted: 10/21/2008, 10:29 AM |
|
Hi Revense,
thanks for your reply.
I should have mentioned that my problem was already solved.
I have it working now with a little modification of the treeview source file.
I'm planning to deploy a demo of my CMS soon so you can see it in action, even with icons and so on.
screenshot:

Again, thanks for the effort, it will be surely of use for someone else.
Kind regards,
Bart
|
 |
 |
REVENSE
Posts: 46
|
| Posted: 10/23/2008, 6:36 AM |
|
Hai hunter, glad that u r problem was solved
btw, nice tree menu. :).
Rev
|
 |
 |
|