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  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
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
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Update Portal settings
Previous Previous
 
Next Next
New Post 12/31/2007 5:42 PM
User is offline Steve
25 posts
10th Ranked


Update Portal settings 

We are trying to set the portsettings to a different portal than the current one. Since Portalid is read only and the current one, we can't figure out how to do this.

We need to get the portalalias for another portal and redirect the user to that selected portal, keeping their user profile etc intact.

Any suggestions ?

 
New Post 1/1/2008 9:00 PM
User is offline Will Strohl
1411 posts
www.WillStrohl.com
6th Ranked




Re: Update Portal settings 

You can do this using the PortalId of the other portal.   (Please note that there may be syntax errors, as I have not tested this code, but it should work.)

Dim PortalId As Integer = 1
Dim p_Portal As New DotNetNuke.Entities.PortalInfo
Dim p_Tab As New DotNetNuke.Entities.TabInfo
Dim ctlTabs As New DotNetNuke.Entities.Tabs.TabController
p_Info = DotNetNuke.Entities.Portals.PortalController.GetPortal(PortalId)
p_Tab = ctlTab.GetTab(p_Info.HomeTabId, p_Info.PortalId, False)
Response.Redirect(p_Tab.FullUrl)

Will LinkedIn profile
DNN Training Videos | My Blog | DotNetNuke® Skins by SSD
Google Toolbar Button for DNN | Suggested DNN Upgrade Paths
ODUG Web Site
 
New Post 1/2/2008 4:31 PM
User is offline Steve
25 posts
10th Ranked


Re: Update Portal settings 

Thanks,

That gets me the portal Info, but not the alias which is required to reload the site to the correct portal.

Getportalalias(portalid) gets the alias but I can't get the alias out of the returned values?

How is this possible?

 
New Post 1/2/2008 6:44 PM
User is offline Will Strohl
1411 posts
www.WillStrohl.com
6th Ranked




Re: Update Portal settings 

Sorry about that...  Here you go.  This will give you comma delimited listing of the portal aliases for a given portal id.

Dim arrPortal As New ArrayList = DotNetNuke.Entities.Portals.PortalAliasController.GetPortalAliasArrayByPortalID(<portal_id>)
Dim strAlias As String = String.Empty
If arrPortal.Length >  0 Then

    For intI As Integer = 0 To arrPortal.Length - 1
        strAlias = String.Concat(strAlias, arrPortal.ToString, ",")
    Next    

End If

Will LinkedIn profile
DNN Training Videos | My Blog | DotNetNuke® Skins by SSD
Google Toolbar Button for DNN | Suggested DNN Upgrade Paths
ODUG Web Site
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Update Portal settings
 


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.

 


DocuPeak Business Process Management RAD
Comprehensive enterprise and government process management. Forms, documents, indexing, workflow, views, content intelligence, capture, etc. Point and click rapid application development.
www.Webiplex.com
ADefWebserver.com
DotNetNuke® Module Development Help Website
ADefWebserver.com
Get Smarter Mail, SmarterStats, SmarterTickets
Windows mail server, web log analytics, and customer service management software - Free Editions Available!
www.smartertools.com

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