Adding tabs to the Browse Views

Sometimes when developing in Livelink you have a requirement to add tabs to the browse view, usually to provide a different presentation to the user of the same object. For example, with the WebDAV module installed, you see the following :

Livelink Folder Browse screen with WebDAV installed and enabled

To add your own tab here you will need to use the following steps to create a simple additional tab that will be displayed when browsing Livelink :

Additionally, we will need to populate three of the provided Script features as follows, firstly for __Init :
				function void __Init()
				    if IsFeature(this,"fViewType") && IsDefined( .fName ) && .IsEnabled() && IsFeature($webnode,"MultiBrowseViewSubsystemV2")
				        if .IsBrowseTab()
				            // Only register objects with the V1 subsystem if they don't make use of V2 features
				            $WebNode.MultiBrowseViewSubsystem.RegisterItem( this, .fViewType )
				        end
				        // Register all objects with the V2 subsystem
				        $WebNode.MultiBrowseViewSubsystemV2.RegisterItem( this, .fViewType )
				    end
				end
			
Secondly the IsEnabled script :
				function Boolean IsEnabled()
				    return .fEnabled && IsFeature(this,"IsBrowseTab")
				end
			
Finally the _IsViewSupported script :
				//	IsViewSupported returns a boolean indicating if the current viewType can be viewed by the user (perhaps based on Browser, etc...)
				function Boolean _IsViewSupported( Object prgCtx, Record request, Dynamic notused=Undefined )
				    return true
				end
			
It is within the _IsViewSupported script that you add code to determine if your tab should be shown or not, some possible contents for this method, based on the the WebDAV module's instance of this script, are shown below :
				// not supported on Unix or Mac
				if ($WebLL.WebUtils.UnixClient( request ) || $WebLL.WebUtils.MacClient( request ))
				    return false
				end

				// not supported on non IE clients
				if !$WebLL.WebUtils.MSIEClient( request )
				    return false
				end

				// if the node is not a container then we don't need the tab
				Dynamic node=request.node
				if Type(node)!=DAPI.DAPINodeType
				    return false
				end
				Object webnode=$WebNode.WebNodes.GetItem( node.pSubType )
				if (!webnode.Container())
				    return false
				end
				// if the node is not a folder
				if (webnode.fSubtype<>$TypeFolder)
				    return false
				end
			
By adding additional code in this function you can determine when your tab is included in a browse page. If the view is supported then our screen would look like :

Livelink Folder Browse screen with WebDAV and Custom Tab installed and enabled

Website Designed by Adservio Consulting Valid HTML 4.01 Strict    Valid CSS!    Level A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0