add html fragments in Topic pages

Post here questions and problems related to editing and publishing DITA content.
catherine
Posts: 158
Joined: Fri Nov 10, 2017 8:16 am

add html fragments in Topic pages

Post 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
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: add html fragments in Topic pages

Post 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.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
catherine
Posts: 158
Joined: Fri Nov 10, 2017 8:16 am

Re: add html fragments in Topic pages

Post 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
Costin
Posts: 833
Joined: Mon Dec 05, 2011 6:04 pm

Re: add html fragments in Topic pages

Post 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
Costin Sandoi
oXygen XML Editor and Author Support
catherine
Posts: 158
Joined: Fri Nov 10, 2017 8:16 am

Re: add html fragments in Topic pages

Post by catherine »

That's cool!
Thanks for your clarification!

Regards,
Catherine
Post Reply