Continue numbering if an OL is inside a step in AEM Guides? | Community
Skip to main content
Level 4
May 1, 2024
Solved

Continue numbering if an OL is inside a step in AEM Guides?

  • May 1, 2024
  • 1 reply
  • 1524 views

Hi, all!

 

I know it perhaps isn't the best DITA, but is there a way to get an <ol> to continue numbering inside of a <step>?

 

For example, here's how it looks currently in a task:

1. Step one here.

2. Step two here.

a. Substep here.

b. Substep here.

1. Legacy third layer <ol>. 

2. Legacy third layer <ol>.

 

Notice that the legacy third layer starts numbering at 1. no matter what.

 

I would like it to look like this:

1. Step one here.

2. Step two here.

a. Substep here.

b. Substep here.

i. Legacy third layer <ol>. 

ii. Legacy third layer <ol>.

 

Notice that the legacy third layer <ol> continues the numbering hierarchy.

 

How can I make this happen? Using a counter?

 

Thanks in advance!

Josh Monacella

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Surbhi_Maheshwari

Thank YOU for the lightning fast response! 🙂

 

I need the customized numbering in the output, specifically Native PDF. 

 

Thanks again!!

Josh


Hi Josh,

 

You can add an outputclass to your <ol> in your dita file like below:

<ol outputclass="ol_numbering" id="ol_1">

 Now we can use this outputclass in Native PDF template CSS file to get desired look and feel. In your case you can add something like below:

ol.ol_numbering { list-style-type: lower-roman; }

Give this a try and let us know how it goes. Feel free to write back for any query/doubt you have.

 

Thanks and Regards,
Surbhi Maheshwari

1 reply

Adobe Employee
May 2, 2024

Can you share the DITA source text?

Level 4
May 2, 2024

I sure can! Here is a source sample:

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "technicalContent/dtd/task.dtd">
<task id="GUID-b6914350-e06d-476e-8db3-ee2815e69bf8">
<title>Test TASK</title>
<taskbody>
<context>
<p>This is a test to see the output of the task topic.</p>
</context>
<steps>
<step>
<cmd>Step 1.</cmd>
</step>
<step>
<cmd>Step 2.</cmd>
</step>
<step>
<cmd>Step 3.</cmd>
<substeps id="substeps_1">
<substep>
<cmd>Substep 1.</cmd>
</substep>
<substep>
<cmd>Substep 2.</cmd>
<info>
<ol id="ol_1">
<li>This is an &lt;ol&gt; inside of substep 2. It should continue the numbering hierarchy. In this case, it should lead with an &quot;i.&quot; not a &quot;1.&quot;</li>
<li>This is &lt;ol&gt; &lt;li&gt; 2.</li>
<li>this is &lt;ol&gt; &lt;li&gt; 3.</li>
</ol>
</info>
</substep>
</substeps>
</step>
</steps>
</taskbody>
</task>

 

 

(Screenshot of the code.)

 

Let me know if you need any additional info!

 

thanks!

Josh

Level 4
May 6, 2024

Hi Josh,

 

You can add an outputclass to your <ol> in your dita file like below:

<ol outputclass="ol_numbering" id="ol_1">

 Now we can use this outputclass in Native PDF template CSS file to get desired look and feel. In your case you can add something like below:

ol.ol_numbering { list-style-type: lower-roman; }

Give this a try and let us know how it goes. Feel free to write back for any query/doubt you have.

 

Thanks and Regards,
Surbhi Maheshwari


As always, I really appreciate your help!! This is working perfectly for our legacy material. 

 

Thanks again!

Josh