Links Module, Link to Tab, FormatUrl(), LinkClick()

Last post 12-11-2005 12:10 PM by diamondz. 2 replies.

Sort Posts:

  • Links Module, Link to Tab, FormatUrl(), LinkClick()

    11-19-2005, 8:48 AM
    • Member
      580 point Member
    • Codepic
    • Member since 04-08-2004, 12:11 PM
    • Finland
    • Posts 116
    Hello,

    I wanted to discuss here about this issue before posting a bug report.

    It seems that still in DNN4.0 the Links module renders non-FriendlyUrls when linking to a tab even though the host settings would be set to FriendlyUrls On

    As I examined the issue further, by using the links module source on DNN 3.1.3 as I couldn't find more recent code base for the module, here's what happens

    The Links.ascx uses FormatURL() for NavigateUrl
    -> FormatURL(ByVal Link As String, ByVal TrackClicks As Boolean)

    Which then passes the parameters to Common.Globals.LinkClick(Link, TabId, ModuleId, TrackClicks)

    The Links table in DNN has only a numeric value (the tabid) when linking to a tab and for this kind of url, LinkClick isn't returning FriendlyUrls even if the host settings would suggest so.

    Now, should DNN core functions return the FriendlyUrl or should the module developer take care of this prior to passing the Url to the LinkClick function?

    Depending on that answer, I believe this is either a core bug or the links module bug.

    My humble opinion is, that LinkClick Should indeed return FriendlyUrls. If the hosts has decided using FriendlyUrls, then I believe the assumption would be that every module and function should conform to this. This would allow every module developer to use the core function to pass the numeric tabid value, or if they decide to make a performance improvement and store the Url in already rewritten manner into DB and bypass rewriting them every time the page is requested.



  • Re: Links Module, Link to Tab, FormatUrl(), LinkClick()

    12-08-2005, 12:03 PM
    • Member
      25 point Member
    • bstricklin
    • Member since 11-04-2005, 5:05 PM
    • Posts 5

    Hi,

    I am having similar problems in that I need for the Links Module to include the PortalName in the url.

    ex.   http://myDNNsite.com/[PORTALNAME]/Default.aspx

     

    Is there a simple solution for this?

    Ben

  • Re: Links Module, Link to Tab, FormatUrl(), LinkClick()

    12-11-2005, 12:10 PM
    • Member
      270 point Member
    • diamondz
    • Member since 03-08-2003, 2:51 AM
    • Posts 54
    Codepic I can understand your problem, in my mind I would say this was a core bug. Did you log it as this?

    I think that dot net nuke is a great product, but as you point out the links tracking doesn't use the friendly URLs.
    Its an easy thing to fix, you just need to make some changes to the core code base, something I've done with DNN 3.1.1 on my development machine to make the link tracking use friendly URLS.

    Hopefully this will be fixed in the next release of DNN.

    Mark

    http://www.bitethebullet.co.uk
    Free C# and DotNetNuke Modules
Page 1 of 1 (3 items)