R2i DotNetNuke® Forum

R2i wants you to have the opportunity to ask questions, post reviews, help others or just rant and rave about DotNetNuke® or any of the R2i Modules and Skins. Our team spends hour upon hour, day after day, working on custom DotNetNuke® modules and services; please feel free to ask us anything.
 
Pretty Handy Tip - Creating Custom Links from the Skin.
Last Post 01 Jan 1900 05:00 AM by . 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
contactdpUser is Offline
Basic Member
Basic Member
Posts:475

--
30 Aug 2006 05:46 PM  

Pretty Handy Tip - Creating Custom Links from the Skin.

Ever Wonder How to Create Custom Navigation/Links from your DNN-Skins?

For Instance if you have pre-defined text-links that you want to manage from the skin.

Example: Home | Sitemap | Help | Contact

One method is to define the hard-coded links associated with the appropriate tab id/tab name (ex: < a href ="/Default.aspx?tabid=36" >Home< / a >).  This requires that you have the exact tab id’s/tab name. This is not the ideal solution.

Here is the best practice method.  

A better method is to manage it via friendly URL’s by following these steps:

  1. Taking the example links - Home | Sitemap | Help | Contact
  2. Link your Home link to home.aspx, Sitemap to sitemap.aspx,  etc in the skin.html or skin.ascx
  3. After establishing the site, modify the siteURLs.config to manage your URL’s.

    (Note: you can change the tab id’s of each url at any time without changing the skin.)

    < RewriterRule >
                < LookFor >.*/ home.aspx< / LookFor >
                < SendTo >~/Default.aspx?tabid=36< / SendTo >
    < / RewriterRule >
    < RewriterRule >
               < LookFor >.*/ sitemap.aspx< / LookFor >
               < SendTo >~/Default.aspx?tabid=74< / SendTo >
    < / RewriterRule >


  4. From DNN 3.3+/4.3+ you can handle the site URL’s from your site's "Host Settings".
      1. Expand "Advanced Settings" and "Friendly URL Settings".
      2. From this point you can manage your hard coded links by adding new rules and typing in your link names, instead of going to the trouble of editing config files on your server.
Durga Prasad(DP) | Senior Web Engineer<br>R2integrated
kparkerUser is Offline
New Member
New Member
Posts:1

--
08 Sep 2006 04:31 PM  
Nice tip. Question.. how does this work when you have multiple portals?

Portal #1: ContactInfo page is tabid=39
Portal #2: ContactInfo page is tablid=25

< RewriterRule >
< LookFor >.*/ ContactInfo.aspx< / LookFor >
< SendTo >~/Default.aspx?tabid=39< / SendTo >
< / RewriterRule >
You are not authorized to post a reply.

Active Forums 4.1
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seatle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share