Last post Dec 14, 2005 11:57 AM by dstgroup
Dec 12, 2005 12:04 PM|kcabrams|LINK
First off let me say I love DotNetNuke 4.0.1. Incredible application. I'm sure there is a simple way to be doing what I am trying to do. I am in the process of rewriting an ASP application to use ASP.NET and DotNetNuke. I am writing my own modules and
placing ASP.NET UserControls within those modules. Within these UserControls i have links sometimes to point back to other pages. (ie: Click here to go Search Members)
These are the steps I have taken and it works but I do not like the fact I have to hard code each link to the correct TabID it was given.
1. Add the new Search Members page
2. Add my custom Search Members module
3. Copy my link location with the /tabid/45/
3. On the home page I have added link at the bottom that says "Click here to go to Search Members"
4. The href="" of that link now says
Surely there is a better way to go about doing this. I will be installing lots of these applications on many different servers and I would like not to have to change my code everytime to put in the new tabID because the second time I tried this eventhough
I added my pages in the same exact order I got a different TABID!!
Is there a dynamic:
<dnn:link target="~/Home/About US/">Click here to go to About Us</dnn:link>
tag of somt sort?
Or better yet maybe a token of some sort
?? Please inform. You cant tell me I have to do links with the "static" tabID constant defined. It will not be the end of the world if I have to but I like my code to be as flexible as possible.
Thanks in advance,
Dec 12, 2005 04:14 PM|dstruve|LINK
You can create a skin object that does this dynamic linking to your search module.
is there some other question?
Dec 12, 2005 04:19 PM|kcabrams|LINK
Dec 12, 2005 04:35 PM|kcabrams|LINK
OK I looked up skin objects. These are the tokens I was referring to. I'm talking about making a link within my control not as a part of the skin. Is it possible to have the skin object run on server side
ie: <dnn:skinobj runat=server>[SKINOBJECT]</dnn:skinobj>
Dec 13, 2005 08:54 AM|dstgroup|LINK
Dec 13, 2005 09:25 AM|dstruve|LINK
if Geoffs solution doesnt work for you, mostly skin objects work on server side, if you look in teh code one skin object is the login module. all skin object are is controls. i.e. modules...
Ok if you dont want the link in the skin, where would you like it in another module, then it probably wont be dynamic unless you code the server side yourself.
Dec 13, 2005 11:11 AM|kcabrams|LINK
Yeah thats cool man. I appreciate everyone tryin to help. It seems like such a simple thing, eventhough what I'm trying to do is definitely different from most applications of DotNetNuke. I just finished placing all my common functions into a Namespace
and class that I'm using like an Include file so I'm going to include some TABID Constants and just put them in there. At least then I will only have to change the tabID's in 1 place. Created a function that goes along with them too. Its kind of asinine
but it works:
'DNN URL Constants
IN THE NAMESPACE.....
Public Const DNN_ROOT =
Public Const DNN_SECTION_HOME =
Public Const DNN_SUBSECTION_LOGIN =
Public Const DNN_TABID_HOME = 36
Public Const DNN_TABID_LOGIN = 53
Dec 13, 2005 01:42 PM|kcabrams|LINK
Hey Geoff thx for the suggestion. I am new to DNN and started with DNN 4.0 but I dont think they use the Default.aspx?tabID=36 anymore as of 4.0.
This is what my page urls look like:
And menu items under home look like so...
That would be much easier if they did tho let me tell you...
Dec 13, 2005 03:15 PM|dstgroup|LINK
Dec 14, 2005 08:58 AM|kcabrams|LINK
Oh man Geoff you just saved the day. I just assumed they did away with the old style of url (ie: Default.aspx?tabid=36) because on all the 3.0 and below DNN sites thats how the urls looked. My application is for internal company use only so thats great because
I dont need to be search engine friendly at all. I'd actually rather have it be more unfriendly. I shall read up on these FriendlyURLs.
Dec 14, 2005 11:57 AM|dstgroup|LINK