WebHelp redirection and fragment in URL
Oxygen general issues.
-
- Posts: 96
- Joined: Wed Feb 09, 2005 8:57 am
WebHelp redirection and fragment in URL
Hi,
Are there any ways to suppress the redirection in WebHelp?
For example, open this URL: https://www.oxygenxml.com/doc/versions/ ... r1m_kfs_zp
Case 1: If JavaScript is disabled on the client web browser, the pages is opened and scrolled to the middle of the page where "#edit-topics__ul_r1m_kfs_zp" is assigned.
Case 2: If JavaScript is enabled on the client (as usual), you are redirect to another URL. This time, the page is not scrolled. The original fragment "#edit-topics__ul_r1m_kfs_zp" is lost.
Sometimes I need the behavior of Case 1 even when JavaScript is enabled, particularly when I have to ask someone to look at a specific portion of the page.
If I could give a certain URL (something like .../eppo-edit-topics.html?redirect=no#edit-topics__ul_r1m_kfs_zp) and if it behaved in the way of Case 1, it would help very much.
Are there any ways to suppress the redirection in WebHelp?
For example, open this URL: https://www.oxygenxml.com/doc/versions/ ... r1m_kfs_zp
Case 1: If JavaScript is disabled on the client web browser, the pages is opened and scrolled to the middle of the page where "#edit-topics__ul_r1m_kfs_zp" is assigned.
Case 2: If JavaScript is enabled on the client (as usual), you are redirect to another URL. This time, the page is not scrolled. The original fragment "#edit-topics__ul_r1m_kfs_zp" is lost.
Sometimes I need the behavior of Case 1 even when JavaScript is enabled, particularly when I have to ask someone to look at a specific portion of the page.
If I could give a certain URL (something like .../eppo-edit-topics.html?redirect=no#edit-topics__ul_r1m_kfs_zp) and if it behaved in the way of Case 1, it would help very much.
-
- Posts: 222
- Joined: Tue Jul 01, 2014 11:48 am
Re: WebHelp redirection and fragment in URL
Post by bogdan_cercelaru »
Hello,
with:
Regards,
Bogdan
If you want to completely disable the redirect, then you should edit the [DITA_OT_DIR]/plugins/com.oxygenxml.webhelp/oxygen-webhelp/resources/js/webhelp_topic.js file and remove or comment the following line:HomeGoods wrote:Are there any ways to suppress the redirection in WebHelp?
Code: Select all
window.location.href=getPath(location.pathname);
This shouldn't happen. To resolve this, you should edit the [DITA_OT_DIR]/plugins/com.oxygenxml.webhelp/oxygen-webhelp/resources/skins/desktop/toc_driver.js and change the following lineHomeGoods wrote:Case 2: If JavaScript is enabled on the client (as usual), you are redirect to another URL. This time, the page is not scrolled. The original fragment "#edit-topics__ul_r1m_kfs_zp" is lost.
Code: Select all
newLink = newLink + "#" + location.search.substring(pos + wh.directory.length)
Code: Select all
newLink = newLink + "#" + location.search.substring(pos + wh.directory.length) + location.hash;
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 96
- Joined: Wed Feb 09, 2005 8:57 am
Re: WebHelp redirection and fragment in URL
Thanks for the fix.bogdan_cercelaru wrote:Code: Select all
newLink = newLink + "#" + location.search.substring(pos + wh.directory.length) + location.hash;
For me to get it work, two more changes were necessary.
- [DITA_OT_DIR]/plugins/com.oxygenxml.webhelp/oxygen-webhelp/resources/js/webhelp_topic.js
ReplacewithCode: Select all
window.location.href=getPath(location.pathname);
because without it, toc_driver.js didn't receive the fragment in the first place.Code: Select all
window.location.href=getPath(location.pathname) + location.hash;
- [DITA_OT_DIR]/plugins/com.oxygenxml.webhelp/oxygen-webhelp/resources/skins/desktop/toc_driver.js
ReplacewithCode: Select all
newLink = newLink + "#" + location.search.substring(pos + wh.directory.length -1);
because I'm testing locally.Code: Select all
newLink = newLink + "#" + location.search.substring(pos + wh.directory.length -1) + location.hash;
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service