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 :
- Orphan WEBNODE:WebNode Root:MultiBrowseView into your module and call it MultiBrowseViews
- Create a Child of this and call it MyMBV
- Set the .fTabLabel feature to what you want the Tab's display name to be, you will need to change the Type of this Feature to String as well.
- Set the .fTabName feature to be the programatic name for the Tab.
- Set the .fName feature to be the OScript name for the tab.
- Set the .fViewType feature to be an unique integer for the Tab.
- Set the .fHTMLFile feature to be the weblingo file to use when the tab is active.
- Set the .fRenderEmptyView feature to true so that the page is still rendered if there is no content to display.
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 endSecondly the IsEnabled script :
function Boolean IsEnabled() return .fEnabled && IsFeature(this,"IsBrowseTab") endFinally 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 endIt 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 endBy 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 :