diff --git a/mod/imscp/locallib.php b/mod/imscp/locallib.php
index 6eb6ebb..4c0a573 100644
--- a/mod/imscp/locallib.php
+++ b/mod/imscp/locallib.php
@@ -61,11 +61,15 @@ function imscp_print_content($imscp, $cm, $course) {
 function imscp_htmllize_item($item, $imscp, $cm) {
     global $CFG;
 
-    $context = get_context_instance(CONTEXT_MODULE, $cm->id);
-    $urlbase = "$CFG->wwwroot/pluginfile.php";
-    $path = '/'.$context->id.'/mod_imscp/content/'.$imscp->revision.'/'.$item['href'];
-    $url = file_encode_url($urlbase, $path, false);
-    $result = "<li><a href=\"$url\">".$item['title'].'</a>';
+    if ($item['href']) {
+        $context = get_context_instance(CONTEXT_MODULE, $cm->id);
+        $urlbase = "$CFG->wwwroot/pluginfile.php";
+        $path = '/'.$context->id.'/mod_imscp/content/'.$imscp->revision.'/'.$item['href'];
+        $url = file_encode_url($urlbase, $path, false);
+        $result = "<li><a href=\"$url\">".$item['title'].'</a>';
+    } else {
+        $result = '<li>'.$item['title'];
+    }
     if ($item['subitems']) {
         $result .= '<ul>';
         foreach ($item['subitems'] as $subitem) {
diff --git a/mod/imscp/module.js b/mod/imscp/module.js
index c51c424..561f157 100644
--- a/mod/imscp/module.js
+++ b/mod/imscp/module.js
@@ -33,6 +33,10 @@ M.mod_imscp.init = function(Y) {
 
     Y.use('yui2-resize', 'yui2-dragdrop', 'yui2-container', 'yui2-button', 'yui2-layout', 'yui2-treeview', 'yui2-json', 'yui2-event', function(Y) {
 
+        var imscp_activate_item_by_index = function(index) {
+            imscp_activate_item(YAHOO.widget.TreeView.getNode('imscp_tree', index));
+        }
+
         var imscp_activate_item = function(node) {
             if (!node) {
                 return;
@@ -41,15 +45,43 @@ M.mod_imscp.init = function(Y) {
             imscp_current_node.highlight();
 
             var content = new YAHOO.util.Element('imscp_content');
-            try {
-                // first try IE way - it can not set name attribute later
-                // and also it has some restrictions on DOM access from object tag
-                var obj = document.createElement('<iframe id="imscp_object" src="'+node.href+'">');
-            } catch (e) {
-                var obj = document.createElement('object');
+            if (node.href) {
+                try {
+                    // first try IE way - it can not set name attribute later
+                    // and also it has some restrictions on DOM access from object tag
+                    var obj = document.createElement('<iframe id="imscp_object" src="'+node.href+'">');
+                } catch (e) {
+                    var obj = document.createElement('object');
+                    obj.setAttribute('id', 'imscp_object');
+                    obj.setAttribute('type', 'text/html');
+                    obj.setAttribute('data', node.href);
+                }
+            } else {
+                // No href, so create links to children
+                var obj = document.createElement('div');
                 obj.setAttribute('id', 'imscp_object');
-                obj.setAttribute('type', 'text/html');
-                obj.setAttribute('data', node.href);
+
+                var title = document.createElement('h2');
+                title.appendChild(document.createTextNode(node.label));
+                title.setAttribute('class', 'sectionname');
+                obj.appendChild(title);
+                var ul = document.createElement('ul');
+                obj.appendChild(ul);
+
+                var i=0;
+                while (i < node.children.length) {
+                    var childnode = node.children[i];
+                    var li = document.createElement('li');
+                    li.appendChild(document.createTextNode(childnode.label));
+                    li.setAttribute('class', 'fakelink');
+                    li.setAttribute('id', 'ref_'+childnode.index);
+                    YAHOO.util.Event.addListener(li, "click", function (oArgs) {
+                        console.log(oArgs.target.id.substr(-1));
+                        imscp_activate_item_by_index(oArgs.target.id.substr(-1));
+                    });
+                    ul.appendChild(li);
+                    i++;
+                }
             }
             var old = YAHOO.util.Dom.get('imscp_object');
             if (old) {
@@ -139,6 +171,17 @@ M.mod_imscp.init = function(Y) {
             }
         };
 
+        var imscp_firstlinked = function(node) {
+            // Return first item with an href
+            if (node.href) {
+                return node;
+            } else if (node.children) {
+                return imscp_firstlinked(node.children[0]);
+            } else {
+                return null
+            }
+        };
+
         var imscp_up = function(node) {
             if (node.depth > 0) {
                 return node.parent;
@@ -271,7 +314,7 @@ M.mod_imscp.init = function(Y) {
         });
 
         // finally activate the first item
-        imscp_activate_item(tree.getRoot().children[0]);
+        imscp_activate_item(imscp_firstlinked(tree.getRoot().children[0]));
 
         // resizing
         imscp_resize_layout(false);
diff --git a/mod/imscp/styles.css b/mod/imscp/styles.css
index 7fbb568..94c5749 100644
--- a/mod/imscp/styles.css
+++ b/mod/imscp/styles.css
@@ -17,4 +17,6 @@
 
 #page-mod-imscp-view .yui-layout-hd h2 {
  color: black;
-}
\ No newline at end of file
+}
+
+.fakelink {cursor:pointer;}
