Wrong base URL using Structure navigation

ltremblet's Avatar

ltremblet

31 Jul, 2018 01:24 PM

I am using Structure 4.3.20 within EE 4.3.2 in a MAMP local server running on PHP 7.1.12.

My site's base URL is : http://localhost:8888/mysite/
The Structure navigation has two pages : "About" and "History".
There is one template : "global/index".

When I use the {exp:structure:nav} tag, the links created by Structure are wrong.
The {base_url} defined in sytem settings does not appear in href attributes of the rendered menu. So that I am not redirected to "mysite" directory but to the localhost root.

I obtain :
http://localhost:8888/history/
http://localhost:8888/about/

But it should be :
http://localhost:8888/mysite/history/
http://localhost:8888/mysite/about/

Did I do something wrong ?

  1. Support Staff 1 Posted by Support on 02 Aug, 2018 02:56 PM

    Support's Avatar

    Hi Lydie, By default, Structure does not include the base url in navigation URLs. You can add the parameter site_url="yes" and that should output the full absolute URL. Let us know if that doesn't work for you!

  2. Support closed this discussion on 02 Aug, 2018 02:56 PM.

  3. ltremblet re-opened this discussion on 03 Aug, 2018 07:47 AM

  4. 2 Posted by ltremblet on 03 Aug, 2018 07:47 AM

    ltremblet's Avatar

    Hi, that works. Thank you!

  5. Support closed this discussion on 03 Aug, 2018 01:11 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac