My site has two pages:
http://www.example.com/en
http://www.example.com/en/contacts
The pages both share a common navbar and some of the navbar links are to specific anchors of the homepage.
These links do not work properly, pointing to the same-named anchor in the current page instead.
I tried all of these syntaxes:
index.php?Itemid=1121&#anchor1
index.php?Itemid=1121&#anchor1
http://www.example.com/en/#anchor1
- 1121 is the ItemID of the homepage;
- All anchors are HTML IDs;
- If no element of the current page has the anchor1 ID, the link does nothing;
- Both addresses work as intended if I use them inside an
<a href="
...">link</a>
structure somewhere else on the page; - Both addresses work as intended if I right click on the links and choose "open in another window/tab";
- The problem was already there before activating the SEF URL rewriting option;
- Changing
&
to&
does not solve the problem; Inspecting the element in Chrome gives me the following code:
<a href="/en/#anchor1" data-uk-smooth-scroll="{offset: 0}">Home Page Anchor</a>
What can I do to solve this problem?
If relevant, I'm using Joomla 3.6.4, PHP 7.0.13 and the Luna theme from Yootheme (hence the uikit smoothscroll data). The behaviour is the same under IE 11.672.10586.0 and Chrome 54.0.2840.99 m