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  |  

The best choice for your web site host, email hosting, and domain registration.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
Click here to go to dev.live.com for Windows Live developer resources
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Configure It! (...  Code snippet ? to generate URLs for DNN pages
Previous Previous
 
Next Next
New Post 6/10/2008 12:27 PM
Resolved
User is offline CT
50 posts
10th Ranked


Code snippet ? to generate URLs for DNN pages 

I'm assuming that there is a recommended/preferred way of doing this so I thought I would ask. I'm looking for code snippets for each of the following cases:

1) Generate the URL for each of the pages set under Advanced Setttings Page Management, ie, for the "Splash Page", "Home Page", "Login Page", and "User Page" in a dynamic way that reflects the currently selected tabs as configured by the Site Admin.

2) Generate the URL for an arbitrarily named page from the list of named pages created for the Portal Site. So it should return the correct full URL for the page named "ThePage" where "ThePage" is one of the named pages configured in the list of pages for the site.

Thanks for the code snippets, or else the link to a discussion of this question. By the way, I looked in Professional DotNetNuke 4 but could not find anything in the book.


CT
 
New Post 6/10/2008 1:23 PM
User is offline Brian Dukes
429 posts
www.engagesoftware.com
8th Ranked


Re: Code snippet ? to generate URLs for DNN pages 

Number 1 looks like DotNetNuke.Common.Globals.NavigateURL(PortalController.GetCurrentPortalSettings().SplashTabId).

Number 2 looks like the following:

            Dim tabs As New TabController()
            DotNetNuke.Common.Globals.NavigateURL(tabs.GetTabByName(tabName, PortalId).TabID)

Hope it helps,


Brian Dukes
Engage Software
St. Louis, MO
314.966.4000

The leading provider of DotNetNuke support, training and custom module development.
 
New Post 6/10/2008 2:25 PM
Accepted Answer 
User is offline CT
50 posts
10th Ranked


Re: Code snippet ? to generate URLs for DNN pages 

Thanks much for the code snippets.

Case number 1 works fine for me without any change.

Case number 2 also works fine for me but with a minor change as follows:

I replaced PortalId with PortalController.GetCurrentPortalSettings.PortalId so that it's properly set to the current active portal.

That code line now reads:

DotNetNuke.Common.Globals.NavigateURL(tabs.GetTabByName("TheDesiredTabName", PortalController.GetCurrentPortalSettings.PortalID).TabID)

Thanks again. I appreciate the pointer.


CT
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Configure It! (...  Code snippet ? to generate URLs for DNN pages
 


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.

 


PointClick DotNetNuke Solutions
PointClick Technologies provides high-end DNN Hosting for businesses.
PointClick.Net Hosted Solutions
Active Modules, Inc.
Creators of Active Forums, the best forum module for DotNetNuke
www.activemodules.com
DotNetNuke Marketplace - Modules & Skins
The DotNetNuke Marketplace is the official e-commerce gateway for the DNN ecosystem. It's the place to buy and sell DotNetNuke modules, DotNetNuke skins, and other DNN offerings.
DotNetNuke Marketplace

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