Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesSimple Menu ModuleSimple Menu Module
Previous
 
Next
New Post
3/18/2012 10:36 PM
 

Hi Guys

I am trying to make a module that will make a simple unordered list of the tabs in DNN.

Anyone got any idea where I start? Has any code been written to extract the relevant info?

Mark


Mark Cooney
Programmer
Ely, Cambridgeshire
07767150058
CambsCreative
mark@cambscreative.co.uk

Visit Ely City Website
 
New Post
3/19/2012 12:25 AM
 

Hi Mark,

Sure, the process is pretty straight-forward if you're familiar with .NET development.

First, you'll need a basic "hello world" module. There are a lot of tutorials online for how to get to that stage. 

Once you have your basic module framework in place, making your menu is pretty easy. You can make a simple list like that using the repeater control. For the data, look at the DNN API for the TabController class in the Dotnetnuke.Entities.Tabs namespace. That will give you the functions to get the tabs for the current portal. You can bind that list to your repeater and you're all set.

Hope this helps,

Mike

 
New Post
3/19/2012 1:31 AM
 
Great stuff, Thanks Mike

Mark Cooney
Programmer
Ely, Cambridgeshire
07767150058
CambsCreative
mark@cambscreative.co.uk

Visit Ely City Website
 
New Post
3/19/2012 2:26 AM
 
Any idea where I can find an up to date copy of this API?

Mark Cooney
Programmer
Ely, Cambridgeshire
07767150058
CambsCreative
mark@cambscreative.co.uk

Visit Ely City Website
 
New Post
3/19/2012 5:33 AM
 
Hi, I found the API documentation:

I have found this code snippet: works great with a but. It shows all tabs that are not deleted or meant to be visible. How do I make it show only allowed Tabs?

Dim sb As New StringBuilder

Dim peers As New Generic.List(Of DotNetNuke.Entities.Tabs.TabInfo)
Dim children As New Generic.List(Of DotNetNuke.Entities.Tabs.TabInfo)


peers = TabController.GetPortalTabs(CustomerPortalID.GetCurrentPortalID, 0, False, False)
'peers = TabController.GetTabsByParent(parentID, portalID)
If peers.Count > 0 Then
sb.Append("
    ")
    For Each peer In peers
    If peer.IsVisible = True And peer.IsDeleted = False Then
    sb.Append("
  • " & peer.TabName & "")
    If withChildren Then
    children = TabController.GetTabsByParent(peer.TabID, portalID)
    If children.Count > 0 Then
    sb.Append("
      ")
      For Each child In children
      If child.IsVisible = True And child.IsDeleted = False Then
      sb.Append("
    • " & child.TabName & "
    • ")
      End If
      Next
      sb.Append("
    ")
    End If
    End If
    sb.Append("
  • ")
    End If
    Next
    sb.Append("
")
End If

Return sb.ToString

Mark Cooney
Programmer
Ely, Cambridgeshire
07767150058
CambsCreative
mark@cambscreative.co.uk

Visit Ely City Website
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesSimple Menu ModuleSimple Menu Module


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out