We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 52631
    • 15 Posts
    Hello,
    Through pdoResources deduce child document from the parent:

    [[pdoResources?
    &parents=`1`
    &depth=`0`
    &tpl=`ListRowTpl`
    ]]


    On the parent page appeared the names of the child documents with links, for example:
    site.com/news/news1.html

    I have disabled use_alias_path. The correct address of the child document: site.com/news1.html.

    How do I remove the address of the parent document (news) of the links?

    This question has been answered by Bruno17. See the first response.

      • 4172
      • 5,888 Posts
      if you have disabled use_alias_path, you shouldn't get the /news/ - part in your links.

      Do you have a base-href - tag with your site_url in your head-section?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 40706
        • 128 Posts
        If "news" is an folder, and no base href tag is included this would be the default behavior.
        To fix this just add &scheme=`abs` to your pdoResources Call.
          • 52631
          • 15 Posts
          Quote from: Bruno17 at Aug 12, 2016, 07:03 AM
          if you have disabled use_alias_path, you shouldn't get the /news/ - part in your links.

          Do you have a base-href - tag with your site_url in your head-section?

          I don't have a base-href - tag, this should help to remove from ' the name of the parent category?
            • 52631
            • 15 Posts
            Quote from: gohhan at Aug 12, 2016, 08:01 AM
            Quote from: Bruno17 at Aug 12, 2016, 07:03 AM
            if you have disabled use_alias_path, you shouldn't get the /news/ - part in your links.

            Do you have a base-href - tag with your site_url in your head-section?

            I don't have a base-href - tag, this should help to remove from ' the name of the parent category?

            It's not a folder, is the address of the parent page. I turn on the news page, it displays links to the child pages.

            I added the code:

            [[pdoResources?
            &parents=`1`
            &depth=`0`
            &tpl=`ListRowTpl`
            &scheme=`abs`
            ]]


            Links to the child pages still have the wrong address, for example: site.com/news/news1.html. Here's the structure of the document:

            news (Parent page)
            -news1
            -news2
            ...
            • discuss.answer
              • 4172
              • 5,888 Posts
              add

              <base href="[[++site_url]]" />


              to your head and you should be good.

              otherwise all relative links will be relative to the current resource-url
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 52631
                • 15 Posts
                Quote from: Bruno17 at Aug 12, 2016, 09:02 AM
                add

                <base href="[[++site_url]]">


                to your head and you should be good.

                otherwise all relative links will be relative to the current resource-url


                Thank you very much! It worked smiley