How to create my own block with tree view contents

Re: How to create my own block with tree view contents

by Raju Adla -
Number of replies: 0

hey hai,

i just created a new sample block according to the instructions that are given in moodle.org.

i opened a yui docs files in that i got a code for a tree view that is

 

YUI().use("yui2-treeview", function(Y)
{
var YAHOO = Y.YUI2;
var treeView = new YAHOO.widget.TreeView("treeContainer");

treeView.render();

});

 

name this file with the extention .js

and write a un ordered list put that in div tag.

give the id=treeContainer for that div tag, now the tree view is ready.

respect to your unordered list,

style it according to your layout format

here the nav_tree.js is above code

thanks