I have been helping a community member get his site templated and marked up correctly but have come a cropper.
I can't find a workaround for Revo when a URL has page anchors as well as URL parameters. The link that is causing the problem is a simple "back to top" page anchor that links to "#top".
There are multiple solutions for this in Evo, but I haven't been able to find any suitable solution for Revo.
The default link code is:
<a id="backtotop" href="#top"><i class="fa fa-chevron-up"></i></a>
After searching the forums I came up with and tested each of the following with partial success:
<a id="backtotop" href="[[++site_url]]#top"><i class="fa fa-chevron-up"></i></a>
<a id="backtotop" href="[[~[[*id]]]]#top"><i class="fa fa-chevron-up"></i></a>
<a id="backtotop" href="[[++site_url]][[~[[*id]]]]#top"><i class="fa fa-chevron-up"></i></a>
When a URL has parameters, for example in gallery or advance search, the URL will always take you back to the first page when clicking the backtotop link.
Example:
mydomain.co.uk/gallery-1.html
mydomain.co.uk/gallery-1.html?page=2
The link generated for both of the above is:
mydomain.co.uk/gallery-1.html#top
So if you click totop on "?page=2" you will always be taken back to "gallery-1.html"
Does anyone have an idea or a workaround to this problem, other than changing the way Revo manages the "link_tag_scheme" - in this case the default "-1" has to be used as the site needs that scheme.
[ed. note: iusemodx last edited this post 10 years, 6 months ago.]