Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AspDotNetStoreFront
  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Make it Hot! ( ...  Determining if Current Page has subpages
Previous Previous
 
Next Next
New Post 11/4/2008 9:22 PM
User is offline joshua
6 posts
10th Ranked


Determining if Current Page has subpages 

Hey all,

Let's say I have the following navigation

Page A
...Subpage 1
...Subpage 2

How through VB do I determine if the currently viewed page has subpages?  For instance, if I was viewing Page A, then I would wanted "True" returned.  However, if I'm on Subpage 1 or Subpage 2, "False" should be returned.

Thanks.

 
New Post 11/4/2008 11:48 PM
User is offline Baatezu
216 posts
9th Ranked


Re: Determining if Current Page has subpages 

 There is a stored procedure called GetTabsByParentId which you could call and check the result to see if it has records.

There may be better ways, but that is the second thing I'd do. The first is writing my own SQL which would be pretty identical to the mentioned stored procedure.

 
New Post 11/5/2008 1:37 AM
Online now... Timo Breumelhof
1912 posts
5th Ranked




Re: Determining if Current Page has subpages 
Modified By Timo Breumelhof  on 11/5/2008 6:59:28 AM)

There is oTab.HasChildren, but AFAIK, it does not consider security.

Dim cTabs As New DotNetNuke.Entities.Tabs.TabController

cTabs.GetTabsByParentId(PageId, PortalSettings.PortalId)

Will return an ArrayList of child pages

But this will return all pages / tabs included the ones user has no rights to or the ones that should not be visible.

So you will have to check the returned pages to see if the user is allowed to see them.

I use:

If oTab.IsDeleted = False AndAlso oTab.IsVisible AndAlso DotNetNuke.Security.PortalSecurity.IsInRoles(oTab.AuthorizedRoles) AndAlso oTab.DisableLink = False Then
      If ((Null.IsNull(oTab.StartDate) OrElse oTab.StartDate < Now) AndAlso (Null.IsNull(oTab.EndDate) OrElse oTab.EndDate > Now)) Then
          Return True
      End If
End If

 

 

 

 


Timo Breumelhof -- DNN Skinning Team Lead -- DNN Custom Skinning
www.searchdotnetnuke.com -- Extended DNN (forum) search
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Make it Hot! ( ...  Determining if Current Page has subpages
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


ZLDNN.COM
We provide commercial DotNetNuke modules.
www.zldnn.com
DNNhost Scandinavia
SUPER fast QuadCore DELL servers, MSSQL servers, DotNetPanel, daily backup, Check out our customers websites
DNNhost.dk
Personify Design, Inc.
Seattle-based Personify Design has developed customized DotNetNuke websites for a wide range of customers to meet many different types of needs, including distributed authorship across thousands of pages to integrated Verisign e-commerce capabilities.
www.personifydesign.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP