Page 1 of 1

add html fragments in Topic pages

Posted: Fri Apr 03, 2020 9:22 am
by catherine
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

Re: add html fragments in Topic pages

Posted: Fri Apr 03, 2020 4:39 pm
by radu_pisoi
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.

Re: add html fragments in Topic pages

Posted: Sun Apr 05, 2020 1:07 pm
by catherine
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

Re: add html fragments in Topic pages

Posted: Mon Apr 06, 2020 12:33 pm
by Costin
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

Re: add html fragments in Topic pages

Posted: Tue Apr 07, 2020 10:04 am
by catherine
That's cool!
Thanks for your clarification!

Regards,
Catherine