How to create my own block with tree view contents

How to create my own block with tree view contents

by Ganesan Gunasekaran -
Number of replies: 1

Hi All,

Can anybody help me to create a block with tree view contents. I have created a simple block with the help of developer doc to create simple HTML block.

Thanks in advance.

Ganesan G.

 

 

Average of ratings: -
In reply to Ganesan Gunasekaran

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

by Raju Adla -

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