• Use friendly alias path issues#

  • helix Reply #1, 6 years, 8 months ago

    Reply
    Maybe someone can help me out with this issue, whenever I turn on "Use friendly alias path" it breaks all the links generated by MenuBuilder and that PageTrail snippet. When I follows links deeper in to the folder it begins to append the folder path alias to all the other links.

    Example:

    Home <- page
    About <- page
    Stuff <- folder
    -> subStuffA <- page
    -> subStuffA <- page

    if I go into Stuff, everthing is fine, except if I go to one of its sub documents, like subStuffA all my links now have http://domain/Stuff/ <- infront of them, as you can see this is a problem when I want to go back to the home page since http://domain/Stuff/home.html is not valid path, and even going to subStuffB will break cause it's listed as http://domain/Stuff/Stuff/subStuffB.html

    I hope that makes sense, I can show and example if anyone really needs, but can't leave it up since the site I'm working on is constantly being view for by the owner for progress. This is so far the only problem I have encountered.

    Thanks!


  • rthrash Reply #2, 6 years, 8 months ago

    Reply
    Friendly alias paths is horribly broken I think... you weren't supposed to notice!
    That's an area I personallly really want to get worked out. I'd love any suggestions of place or other projects you've seen that have it worked out. Thanks!


  • opengeek Reply #3, 6 years, 8 months ago

    Reply
    Quote from: element at Jun 01, 2005, 11:58 AM
    Maybe someone can help me out with this issue, whenever I turn on "Use friendly alias path" it breaks all the links generated by MenuBuilder and that PageTrail snippet. When I follows links deeper in to the folder it begins to append the folder path alias to all the other links.

    Example:

    Home <- page
    About <- page
    Stuff <- folder
    -> subStuffA <- page
    -> subStuffA <- page

    if I go into Stuff, everthing is fine, except if I go to one of its sub documents, like subStuffA all my links now have http://domain/Stuff/ <- infront of them, as you can see this is a problem when I want to go back to the home page since http://domain/Stuff/home.html is not valid path, and even going to subStuffB will break cause it's listed as http://domain/Stuff/Stuff/subStuffB.html

    I hope that makes sense, I can show and example if anyone really needs, but can't leave it up since the site I'm working on is constantly being view for by the owner for progress. This is so far the only problem I have encountered.

    Thanks!

    element, I believe you can add a <base href="http://..." /> to the HEAD element of your template( s ) to solve this issue until we can make it work with relative paths properly. Try it out and let me know if that works for you. If not, you're going to need to go back and force everything to an absolute path on the server. If you're in the root of your server, great; if not, you lose portability without making major changes.


  • helix Reply #4, 6 years, 8 months ago

    Reply
    That seemed to have solved my problem, at least for now because I'm hosting these sites my self. I'm not sure how they'll be effect when they are eventually moved over to there hosting servers after completion. We'll just have to see, or I'll have to work on a fix or a short term hack .

    Thanks for your help. I just have to reitterate that I love the community around modx, moving over was the best choice I ever made.


  • Zaigham (aka zi) Reply #5, 6 years, 8 months ago

    Reply
    Quote from: element at Jun 02, 2005, 12:06 PM
    Thanks for your help. I just have to reitterate that I love the community around modx, moving over was the best choice I ever made.

    Thanks for kind appreciation, Element !!

    Glad you love us
    Have a nice stay with us !

    Regards,

    zi


  • helix Reply #6, 6 years, 8 months ago

    Reply
    Okay the <base href=""> solved the problem momentarily, that is up until I upgraded to firefox 1.0.4 and then it broke again. After some research I found some interesting information on relative paths and the about using the <base> tag, you can read a good thread about it here http://www.chrisjdavis.org/2005/05/23/base-href/ I found the best way to solve the problem is to use absolute urls and modify the snippets (MenuBuilder and PageTrail) to include the root / so the paths now appear in the link as "/about/contact.html" instead of "about/contact.html" seems to be the best solution at the moment for anyone wanting friendly alias paths, so far works in all browser and doesn't require the base tag.