1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Pages & HTML

Discussion in 'XenForo Questions and Support' started by Chimpie, Aug 11, 2014.

  1. Chimpie

    Chimpie Well-Known Member

    I'm having a problem with creating a link within a page to jump to another part of the page.

    I've created a test page w/in my XF forum and on a different site as a simple page to show the difference.

    Separate site: http://chimpie.com/sandbox2/test-link.php

    XF: http://emtlife.com/pages/test-link/

    If you go to the top link, you will see a link to jump to Chapter 4. Clicking it will take you to that chapter, theoretically.

    If you go to the XF link, which uses the exact same code, clicking on the Chapter 4 link takes you make to the main forum page, looking for that tag, which of course doesn't exist.

    What do I need to do so that in my XF page that link will work correctly?
  2. Chris D

    Chris D XenForo Developer Staff Member

    <a href="#C4">See also Chapter 4.</a>
    <a href="pages/test-link#C4">See also Chapter 4.</a>
  3. Chimpie

    Chimpie Well-Known Member

    Yeah, I did that before and it worked. I'm just trying to dig a little deeper to figure out why it doesn't work the way it normally should.
  4. Chris D

    Chris D XenForo Developer Staff Member

    It's because of the base tag:

    <base href="http://emtlife.com/" />
    All URLs within XenForo are relative to the base URL. On your old page, all URLs were relative to the path that page is in.
    Chimpie likes this.

Share This Page