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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How to know how many Parent Portals do I have ?How to know how many Parent Portals do I have ?
Previous
 
Next
New Post
1/31/2011 8:32 AM
 
I need to know how many Parent Portals I have in a DNN installation.

Lets say that I have a DNN installation, then I create some Child Portals and some Parent Portals, and adding some Portal Aliases to that portals. What I need to know is the number of Parent Portals created.

Is there a field in any table that allow me to identify if a portal is a Parent Portal or a Child Portal ?

Thanks in advance
 
New Post
1/31/2011 10:06 AM
 
This is the only way (AFAIK) to know which portal is parent or child:


Private Function GetPortalAliases(ByVal portalId As Integer) As ArrayList
        'Dim ctlPortals As New PortalController()
        Dim ctlPortalAlias As New PortalAliasController()
        Dim returnPortalAliasesList As ArrayList = New ArrayList()

        Dim portalAliasesList As ArrayList = ctlPortalAlias.GetPortalAliasArrayByPortalID(portalId) 'objPortal.PortalID)
        For Each objPortalAliasInfo As PortalAliasInfo In portalAliasesList
            Dim strPortalName As String = String.Empty
            If Convert.ToBoolean(InStr(1, objPortalAliasInfo.HTTPAlias, "/")) Then
                strPortalName = Mid(objPortalAliasInfo.HTTPAlias, InStrRev(objPortalAliasInfo.HTTPAlias, "/") + 1)
            End If
            If strPortalName <> String.Empty AndAlso System.IO.Directory.Exists(Me.SiteRootPhysicalPath & "\" & strPortalName) Then
                ' child portal, so ignore it
            Else
                ' parent, portal, so list it
                returnPortalAliasesList.Add(objPortalAliasInfo)
            End If
        Next
        Return returnPortalAliasesList
    End Function



Best,
Horacio.-
 
New Post
2/1/2011 3:59 PM
 
if you can log on as host, go to HOST | SQL and

select * from portalalias

look at the http_alias column. if there is a url with / and another name at the end, that is a child version of a portal name.

However, be aware that a portal can have a child portal http_alias format, and then can be given a regular alias with a parent format.

PortalID 7 www.mydomain.com ... this is a parent-type alias for portal 7
PortalID 8 www.mydomain.com/floatation this is a child-type alias for portal 8
PortalID 8 www.floatation.com this is a parent-type alias for portal 8

So the portal with PortalID 8 ... it has both child and parent format URL. Each alias points at the same content. There is no difference between a child portal and a parent portal except that parent portals have their own primary URL.

Lots of portals start out as a child portal of one domain/url and then after development they get their own domain/url and grow up to be parent portals.

Many, if not most, parent portals are never truly "parents" since most of them have no children. The nomenclature is not entirely fitting.

pmgerholdt
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How to know how many Parent Portals do I have ?How to know how many Parent Portals do I have ?


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