Adding section templates to topics?
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 24
- Joined: Mon Aug 24, 2015 11:37 pm
Adding section templates to topics?
Post by Glimmerino »
I would like to add a warning image with belonging text as a template into a topic. This is to speed up my writing, so instead of having to adding the image and the text for each occasion, I would just like to include a "section template" that I can edit for each instance. The text will be different from case to case and thats why I can't use the conref element.
Is there anyway to do this?
Is there anyway to do this?
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Adding section templates to topics?
Hi,
What you can do is to create a code template that contains the image reference and a call to the ask editor variable that allows you to enter the text content. Here is an example:
To define code templates open the Preferences dialog box, go to Editor > Templates > Code Templates options page and use the "New" action.
Here are the details about code templates preferences:
https://www.oxygenxml.com/doc/versions/ ... lates.html
And here you can find explanations about "ask" editor variables:
http://www.oxygenxml.com/doc/versions/1 ... ables.html
Best Regards,
Mihaela
--
Mihaela Calotescu
<oXygen/> XML Editor
What you can do is to create a code template that contains the image reference and a call to the ask editor variable that allows you to enter the text content. Here is an example:
Code: Select all
<p><image href="image_url"/>${ask('Please insert the text:', 'generic', 'default text')}</p>
Here are the details about code templates preferences:
https://www.oxygenxml.com/doc/versions/ ... lates.html
And here you can find explanations about "ask" editor variables:
http://www.oxygenxml.com/doc/versions/1 ... ables.html
Best Regards,
Mihaela
--
Mihaela Calotescu
<oXygen/> XML Editor
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 24
- Joined: Mon Aug 24, 2015 11:37 pm
Re: Adding section templates to topics?
Post by Glimmerino »
Thank you, this was very helpful. Is there any way to add a border around a template (or around a paragraph in general?).
Regards
Kristian
Regards
Kristian
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Adding section templates to topics?
Hello,
Can you please give me more details about what you need?
You want to see the border when you open the document in Author mode or in the output of a transformation process?
If the transformation is your use-case, tell me please what type is it (PDF, XHTML, ...).
Best Regards,
Mihaela
--
Mihaela Calotescu
<oXygen/> XML Editor
Can you please give me more details about what you need?
You want to see the border when you open the document in Author mode or in the output of a transformation process?
If the transformation is your use-case, tell me please what type is it (PDF, XHTML, ...).
Best Regards,
Mihaela
--
Mihaela Calotescu
<oXygen/> XML Editor
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 24
- Joined: Mon Aug 24, 2015 11:37 pm
Re: Adding section templates to topics?
Post by Glimmerino »
I want to see it in the output as pdf and XHTML.
As I mentioned earlier I want to add a "warning" template. The template looks like:
WARNING
<image
As I mentioned earlier I want to add a "warning" template. The template looks like:
WARNING
<image
-
- Posts: 24
- Joined: Mon Aug 24, 2015 11:37 pm
Re: Adding section templates to topics?
Post by Glimmerino »
Sorry, my last answer probably didnt make much sense since a accidentaly pushed "Submit" Before I was finished.
What I want as output in pdf and xhtml is:
A rectangular frame with outer border containing the Word "WARNING" and an image of a red triangle. Below the image but still inside the rectangle it shall be possible to insert optional text.
I hope it can be understood.
REgards
Kristian
What I want as output in pdf and xhtml is:
A rectangular frame with outer border containing the Word "WARNING" and an image of a red triangle. Below the image but still inside the rectangle it shall be possible to insert optional text.
I hope it can be understood.
REgards
Kristian
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Adding section templates to topics?
Hi Kristian,
In DITA there is a "note" element that you can use to include warning information (it has a type attribute with "warning" as possible value).
If this solution is not right for you, here is what you can do to customize the styling of the elements in the output:
1. For the XHTML transformation you can set the value of the outputclass attribute to the CSS class attribute that will be used in the HTML code to style the node. Here are some details about this attribute:
http://www.oxygenxml.com/dita/styleguid ... ibute.html
The name of the CSS file that will contain the styles for this node class must be specified in the transformation scenario - go to the Parameters tab of the scenario, edit the args.css parameter and set its value to this custom CSS file path.
You can also edit the args.copycss parameter and set it to yes to copy the CSS to the output directory.
2. For the PDF transformation, you can check this topic from our online manual:
http://www.oxygenxml.com/doc/versions/1 ... ation.html
If you need further assistance please let us know.
Best Regards,
Mihaela
--
Mihaela Calotescu
<oXygen/> XML Editor
In DITA there is a "note" element that you can use to include warning information (it has a type attribute with "warning" as possible value).
If this solution is not right for you, here is what you can do to customize the styling of the elements in the output:
1. For the XHTML transformation you can set the value of the outputclass attribute to the CSS class attribute that will be used in the HTML code to style the node. Here are some details about this attribute:
http://www.oxygenxml.com/dita/styleguid ... ibute.html
The name of the CSS file that will contain the styles for this node class must be specified in the transformation scenario - go to the Parameters tab of the scenario, edit the args.css parameter and set its value to this custom CSS file path.
You can also edit the args.copycss parameter and set it to yes to copy the CSS to the output directory.
2. For the PDF transformation, you can check this topic from our online manual:
http://www.oxygenxml.com/doc/versions/1 ... ation.html
If you need further assistance please let us know.
Best Regards,
Mihaela
--
Mihaela Calotescu
<oXygen/> XML Editor
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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