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  |  

telerik -- supercharge your DNN websites
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
WebHostForAsp.net
 


  Sponsors  

Meet Our Sponsors

.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
 


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
428 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.

 


SteadyRain
Founded in 1999, SteadyRain has extensive experience delivering Internet technology strategies and solutions for a diverse client base, ranging from Fortune 500 firms to successful start-ups.
www.steadyrain.com
AfterImage Internet Consulting and SEO Services
AfterImage provides search engine optimization (SEO), Internet consulting and hosting services for the Windows platform (IIS, ASP, SQL Server).
www.afterimage.nl/
Willhite & Sharron Realtors
Exemplary service for your Seattle Real Estate needs. It's what you deserve from your Realtor®!
www.alkihomes.com

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