I want to be able to assign href,hrefTarget and qtip on a per layer 
basis to a layer tree. If these attributes are added to layer, then I 
can do with easily with change below (sorry, I dont know how to turn 
this into a GeoExt patch). Change is createNode in layerloader.js

Old function
     createNode: function(attr) {
         if(this.baseAttrs){
             Ext.apply(attr, this.baseAttrs);
         }
         if(typeof attr.uiProvider == 'string'){
            attr.uiProvider = this.uiProviders[attr.uiProvider] || 
eval(attr.uiProvider);
         }
         attr.nodeType = attr.nodeType || "gx_layer";

         return new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr);
     },

New  function
     createNode: function(attr) {
         if (attr.layer.href)  {
            attr.href = attr.layer.href;
            attr.cls = 'linknode';
            if (attr.layer.hrefTarget) attr.hrefTarget = 
attr.layer.hrefTarget;
         }
         if (attr.layer.qtip) attr.qtip = attr.layer.qtip;
         if(this.baseAttrs){
             Ext.apply(attr, this.baseAttrs);
         }
         if(typeof attr.uiProvider == 'string'){
            attr.uiProvider = this.uiProviders[attr.uiProvider] || 
eval(attr.uiProvider);
         }
         attr.nodeType = attr.nodeType || "gx_layer";

         return new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr);
     },



Notice: This email and any attachments are confidential. If received in error 
please destroy and immediately notify us. Do not copy or disclose the contents.

_______________________________________________
Dev mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/dev

Reply via email to