I am using Sites (which I assume is very similar to Hub) to create a web site and I ran into a problem of referencing a specific section on a different page.
In one of the child pages, I created an anchor for a specific section by adding <div id="section"> in the text box using html editing. On the same child page, I can add a link to this section by using <a href="#section">. However, I can't find a way to refer to this anchor if I am on a different page.
For example, if the link to the child page is <a href="#/site_name/pages/childpage">, I've tried many different url format but none of them works:
<a href="#/site_name/pages/childpage#section">
<a href="#/site_name/pages/childpage/#section">
<a href="#/site_name/pages/childpage%23section">
<a href="#/site_name/pages/childpage%2F%23section">
Have anyone succeeded in doing this?
Any help is appreciated! Thanks!
I'm seeing that both of the following formats work when linking between separate pages (link clicked on home page, goes to section to child page). Curious whether you've tried other browsers or clearing your browser cache?
Works:
<a href="#/site_name/pages/childpage#section">
<a href="#/site_name/pages/childpage/#section">
Using link url:
<a href="https://SITENAME.hub.arcgis.com/pages/childpage/#section">
I'm working on Chrome version 120.0.6099.130 (Official Build) (64-bit).
I was using Edge and just tried Chrome too. However, it still doesn't work. The link will take me to the child page, but not the specific section.
Maybe this is a problem specific to Sites, not Hub?
There are definitely functionality differences between Hub on AGOL and Sites so thanks for highlighting that. What version of Enterprise are you on?
We have been using Sites since the 10.8 release, I believe, and there has been some work on this topic (BUG-000130923, ...). Since then, the anchor behavior has changed with about every third release.
I updated from Enterprise 11.2 to 11.4 today.
In 11.2, the following is possible:
In 11.4, this is no longer working and you have to use the following, as Samuel_McAuley also pointed out:
Please visit this 11.4 test page to inspect the different schemes I tried out.
You see, however, that clicking the working 11.4 link will break the URL to: https://maps.vdl.lu/portal/apps/sites/#top
Can You reproduce this?
Yes, I have the same behavior in version 11.3 😑