We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19388
    • 297 Posts
    Hi people,
    Hi people,
    I recently have converted some symlinks to weblinks.

    I have a structure like this:
    Hospital XXXXX ( 132 )
    - The Hospital ( 38 )
    - Rooms ( 39 )
    - Doctors ( 40 )
    - Contact us ( 41 )

    ID 132 is a weblink pointing to 38 ( weblink value 38 ) , and it works fine. The link is well-formed with its alias ( i.e. www.mydomain.com/hospital-xxxx/ ), but when I access trought document 132 ( the weblink ), the browser points to www.mydomain.com/38 instead of www.mydomain.com/hospital-xxxx/the-hospital.html

    Any ideas??
    Thanks!
      • 19388
      • 297 Posts
      It works if I use [[~38]]
      A little bit confusing...
        • 24687
        • 14 Posts
        Are you using revo ?
        Does this happen with any other pages ?

        If yes,
        go to your system settings and on page 3 ( may be on another page if you’ve made more settings ) check the friendly urls area

        I have:
        setting_friendly_alias_urls = true
        setting_friendly_urls = true
        setting_use_alias_path = true

        This fixed the problem for me.
          • 19388
          • 297 Posts
          Sorry I forgot to say I’m using revo 2.0.7
          I had all this settings set to "true". The "problem" was solved using [[~38]] instead of 38. I suppose because weblinks are thought as external links we have to use a complete URL.
          I was having a problem with internal links but it was caused because another misunderstud by myself. For interested users... when you setup a symlink, it only get the contents of the referenced page, but not the other objects as template variables. You have to set TV values for both pages, or only in the symlink, if you want it to work ( at least in my structure, wich have some conditionals and other stuff ).
            • 24687
            • 14 Posts
            Glad you fixed the problem after all.

            I don’t do my links like that, maybe you’re supposed to ? or maybe it’s just a personal preference. If you remember to set a correct resource alias on every page you don’t need the [[~id]] you can go striate to the page via the alias link you gave.

            So in this case if your alias was the-hospital
            you can use /hospital-xxxx/the-hospital
            instead of [[~38]]
            That way all your links are SEF

            Just remember to put
            <base href="[[++site_url]]" />
            in the head of your template.
              • 19388
              • 297 Posts
              I think using [[~38]] for a simple reason, if the alias change, i have to change the alias in all weblinks. In this way, I know the ID is always the same and I don’t need to have care about any changes. [[~38]] will generate a SEF Link
              I’m using base_href too wink
              Thanks for your explanation laugh
                • 24687
                • 14 Posts
                lol, ahhaaa. undecided

                I do use [[~pageid]] for a page I think may change in the future but I never new they also made SEF links, I may have to go and do some tinkering later on then.
                It’s certainly a lot more convenient to build links like that,as you said,you don’t have to worrie about change in the alias paths.

                lol how strange, you posted requesting for help, I posted trying to help and in return you sort of just helped me instead, to realise a more convenient way of doing links.
                  • 19388
                  • 297 Posts
                  We both has solved a problem thanks to the other, 2 in 1, this is community! laugh