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...Getting the TabID for a pageGetting the TabID for a page
Previous
 
Next
New Post
4/13/2007 10:04 AM
 

Hi,

I think I'm missing a trick here as what I want to do is to get the TabID for a particulatr page, then use that in a hyperlink.

I looked at NavigateURL, but as there doesn't appear to be any coherent description of how I might use that, I decided to create an SQL Query on the Tabs Table, specifying the keyword.

I just thought thta there mat be an existing method in the DotNetNuke API that did this......

regards,
Duncan.

 

 
New Post
4/13/2007 10:08 AM
 

You can pass a Tabid directly to NavigateUrl and it will return the link to the page.


DotNetNuke Modules from Snapsis.com
 
New Post
4/13/2007 10:42 AM
 

Thanks, John - but what I need for that is the TabID! :)

I did this:

 ALTER PROCEDURE dbo.GetPageTabID
 @keywords  nvarchar(500) /*Use the keywords that are in the Tabs table */

AS
 SELECT        TabID
 FROM            dbo.Tabs
 WHERE        (keywords = @keywords)

.. it worked fine.
I just wondered whether there was a predefined way to do this... [seems like an obvious requirement].

One of the frustrating issues about DNN is that the developers' documentation on what is now a very large and sophisticated solution is woefully behind the times. I'd just like to be able to see a reference that a) lists all the methods in the API and b) describes them - with a code snippet....

regards,
Duncan.

 
New Post
4/13/2007 11:20 AM
 

If all you have are the keywords to get a TabId then your procedure will have to do.

There is the TabController.GetTabByName  method if you wanted to do it that way, but that one is flawed because you could have two tabs with the same name in the portal and it will only give you the one with the lower tabid.

If you want the TabId for the active page, that is easy:  PortalSettings.ActiveTab.TabId


DotNetNuke Modules from Snapsis.com
 
New Post
4/13/2007 1:26 PM
 

Thanks John, for the confirmation.

The advantage of this approach is that if there are two or more instances of a module, the web administrater can be advised to set up keywords with a simple numeric extension ie 
Keyword: 'MyNewModule #01' 
Keyword: 'MyNewModule #02'   etc...

and the code can test this and response.redirect accordingly... A tad hackish, but would suffice.
As it is, my application will only have the one instance...

Thanks for the advice.

Regards,
Duncan

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Getting the TabID for a pageGetting the TabID for a page


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