Make entire box clickable
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 141
- Joined: Mon Jun 12, 2017 10:50 am
Re: Make entire box clickable
Post by cosmin_andrei »
Hi jonathanm,
The default implementation is based on the following action - when you click on the text/word to open the respective chapter. In order to make the entire box clickable, you can find more details here:
https://github.com/oxygenxml/oxygen-pub ... k-on-tiles
The default implementation is based on the following action - when you click on the text/word to open the respective chapter. In order to make the entire box clickable, you can find more details here:
https://github.com/oxygenxml/oxygen-pub ... k-on-tiles
Regards,
Cosmin
--
Cosmin Andrei
oXygen XML Editor and Author Support
Cosmin
--
Cosmin Andrei
oXygen XML Editor and Author Support
Re: Make entire box clickable
Hi Jonathan,
Please note that the "Click on Tiles" customization includes also an HTML fragment which should be added in your publishing template.
Please make sure that you follow the instructions from the WebHelp User-Guide to add the fragment into the template.
After you've added both the HTML fragment and the CSS customization, then you should publish the output using the custom publishing template you created.
Regards,
Costin
Please note that the "Click on Tiles" customization includes also an HTML fragment which should be added in your publishing template.
Please make sure that you follow the instructions from the WebHelp User-Guide to add the fragment into the template.
After you've added both the HTML fragment and the CSS customization, then you should publish the output using the custom publishing template you created.
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Re: Make entire box clickable
I'm getting a red error line using the HTML fragment you provided:
<script type="text/javascript">
<!--
const list = document.querySelectorAll('.wh_tile');
Array.prototype.forEach.call(list, function (tile) {
tile.addEventListener('click', event => {
tile.querySelector('a').click();
});
});
-->
</script>
<script type="text/javascript">
<!--
const list = document.querySelectorAll('.wh_tile');
Array.prototype.forEach.call(list, function (tile) {
tile.addEventListener('click', event => {
tile.querySelector('a').click();
});
});
-->
</script>
- image.png (22.95 KiB) Viewed 2051 times
- image.png (85.39 KiB) Viewed 2051 times
Re: Make entire box clickable
Hi,
Please note that is not necessary for the fragment to be a valid HTML.
All that matters is that the fragment should be a well-formed XML, as also mentioned in the How to Insert HTML Content topic from our User-Guide.
Also, at line 15, in the template's description you did not specify any placeholder.
You should look into the HTML Fragment Extension Points user-guide topic to identify the correct placeholder you could use.
Regards,
Costin
Please note that is not necessary for the fragment to be a valid HTML.
All that matters is that the fragment should be a well-formed XML, as also mentioned in the How to Insert HTML Content topic from our User-Guide.
Also, at line 15, in the template's description you did not specify any placeholder.
You should look into the HTML Fragment Extension Points user-guide topic to identify the correct placeholder you could use.
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Return to “General XML Questions”
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