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

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Determining if Current Page has subpagesDetermining if Current Page has subpages
Previous
 
Next
New Post
11/5/2008 12:22 AM
 

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/5/2008 2:48 AM
 

 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 4:37 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

 

 

 

 

 
New Post
11/21/2009 6:21 PM
 

Hi,

I would like to display the links skinobject if the page has children.  I'd also like to add a title to it saying "Related Links".

Here's what I'm trying to do in the index.ascx.  Any thought?

 

<% If oTab.IsDeleted = False AndAlso oTab.IsVisible AndAlso

DotNetNuke.Security.PortalSecurity.IsInRoles(oTab.AuthorizedRoles) AndAlso oTab.DisableLink =

False %>


  <div id="skinobject" style="width:100%;">Related Links &raquo;&nbsp;
    <dnn:LINKSSUB runat="server" id="dnnLINKSSUB" Separator="&nbsp;"

Alignment="Horizontal" Level="Child" ForceLinks="False" CssClass="skinobject" />
       </div>


<% End If %>

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Determining if Current Page has subpagesDetermining if Current Page has subpages


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