add html fragments in Topic pages

catherine
Posts: 133
Joined: Fri Nov 10, 2017 8:16 am

add html fragments in Topic pages

Post by catherine » Fri Apr 03, 2020 9:22 am

Hi,
I find that Oxygen only provide parameters to add html fragments to the Index page.
Is there any way that I can add html fragments to Topic pages?

In the past, I changed the Topic template page, but if I update Oxygen application to a new version.
Some problems may occur and as your documentation says, this method is no longer suggested.

I’m finding a way to customize the Topic pages, simply add several HTML fragments.

Regards,
Catherine

radu_pisoi
Posts: 374
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: add html fragments in Topic pages

Post by radu_pisoi » Fri Apr 03, 2020 4:39 pm

Hi,

Indeed, it is a better idea to use HTML fragment extension points to modify the generated HTML files.

For topic pages, you can use one of: webhelp.fragment.head, webhelp.fragment.before.body or webhelp.fragment.after.body.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

catherine
Posts: 133
Joined: Fri Nov 10, 2017 8:16 am

Re: add html fragments in Topic pages

Post by catherine » Sun Apr 05, 2020 1:07 pm

Hi, Radu Pisoi
Thanks for your tips.
The problem is that I need to insert HTML fragments in the <body> element, or the HTML fragments cannot be displayed on the Topic pages in the webhelp output.

Regards,
Catherine

Costin
Posts: 691
Joined: Mon Dec 05, 2011 6:04 pm

Re: add html fragments in Topic pages

Post by Costin » Mon Apr 06, 2020 12:33 pm

Hi Catherine,

There must be a misunderstanding here.
Even if their naming was not very inspired, the webhelp.fragment.before.body and webhelp.fragment.after.body parameters refer to placeholders that are part of the <body> element.

More specific, the webhelp.fragment.before.body parameter displays the HTML fragment as the very first element inside the body, while webhelp.fragment.after.body displays the fragment also inside the body, at the end of the content.
You should just test the parameters.

Indeed, the documentation may be a bit confusing, so I've also logged an improvement request to our documentation team, to make it more clear, but you could still observe the position of the HTML fragments inserted by each of the parameters in the Figure (imagemap for the corresponding placeholders) from the HTML Fragment Extension Points subsection (see the placeholders 2 and 13).

Best Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support

catherine
Posts: 133
Joined: Fri Nov 10, 2017 8:16 am

Re: add html fragments in Topic pages

Post by catherine » Tue Apr 07, 2020 10:04 am

That's cool!
Thanks for your clarification!

Regards,
Catherine

Post Reply