We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21417
    • 486 Posts
    Hello,

    I am building an intranet site with MODx Evo 1.04 and am having trouble with ’local’ links that link to existing documents outside of the intranet, but within the company’s existing file network.

    Some of these links have back slashes and look like:
    \\psp7\public\Admin\etc.xls

    I firstly tried using the Weblink field (instead of a tv as that is my preferred option) but this strips most of the slashes and comprises the link - it becomes:
    \psp7publicAdminetc.xls

    Then I setup a TV called "link" and paste the link into the TV:
    \\psp7\public\Admin\etc.xls

    The "link" looks fine in the html page source (which look like it will work fine):
    \\psp7\public\Admin\etc.xls

    but when clicked comes up in the browser as (which does not work):
    http://domain.com/\\psp7\public\Admin\etc.xls


    My row template for the Wayfinder menus looks like this:
    <li[+wf.classes+]>
    <a href="[+phx:if=`[+pdf+]`:isnot=``:then=`[+pdf+]`:else=`[+link+]`+]" title="[+wf.title+]"[+wf.attributes+]>[+wf.linktext+]
    [+phx:if=`[+wf.description+]`:is=``:then=``:else=` [+wf.description+]`+]</a>
    [+phx:if=`[+status+]`:is=``:then=``:else=`<span> * [+status+]</span>`+]
    [+wf.wrapper+]</li>


    Is there a trick to getting these "alternate" links working in the Weblink field?

    Otherwise, how do I keep the domain name out of these special TV [+link+] links when clicked in the browser?

    Any ideas?

    Thanks for looking.
      Web design Adelaide
      http://gocreate.com.au
      • 36702
      • 76 Posts
      The \\server\path\file UNC format is not meant for web links I think. You could try prefixing them with file:// to set the correct protocol?

      EDIT: I just tried this, and it seems to work ok with Internet Explorer (but not Firefox): href="file://server/path/file.ext" (backslashes or forward slashes both work)
        • 21417
        • 486 Posts
        Hi twz,

        hmmm, this is tricky.

        so for the link...

        \\psp7\public\Admin\etc.xls

        you suggest...

        file:\\psp7\public\Admin\etc.xls


        When I do this in the Weblink field, the result is empty in Firefox - eg ""

        When I do this in the link TV, it looks like so in the HTML source in Firefox "file:\\psp7\public\Admin\etc.xls" but on hovering the link the browser shows the link as file:///psp7/public/Admin/etc.xls - it seems to add an extra slash and then reverse the back slahes to forward slashes.

        Any other ideas?
          Web design Adelaide
          http://gocreate.com.au
          • 36702
          • 76 Posts
          I haven’t tried it within MODx - just with a plain html file, but it sounds like the link TV method will work.

          Apparently Firefox has a problem with UNC paths for security reasons. There are a few workarounds at http://kb.mozillazine.org/Links_to_local_pages_do_not_work
            • 21417
            • 486 Posts
            Thanks twz.

            The TV method looks good in the source of IE - this is for an intranet and they run IE internally so hopefully it will work as intended when I move the site to the server.

            Thanks for your help.
              Web design Adelaide
              http://gocreate.com.au