Expand my Community achievements bar.

SOLVED

Native PDF Custom Note Types?

Avatar

Level 4

Hi, all!

 

I have a question regarding custom note types in Native PDF. 

 

In our current DITA OT output, we have custom note types set up like this:

joshm19816095_0-1713200977052.png

 

The type=other tells the output to use whatever text the author enters in the othertype field. In this case, "Notes" display instead of "Note."

 

How can I get my AEM Native PDF output to utilize this in the same way?

 

Thank you!

Josh

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

 

Please try adding the following CSS to your templates's CSS file:

 

div[data-attr-othertype]>span.prefix-content {
  display:none;
}
div[data-attr-othertype]:before{
  content: attr(data-attr-othertype)": ";
}

 

In this case it will pick the value of othertype attribute and put it before the prefix-content (e.g. Note) in your example above. It should work for different values of type like danger, caution etc.

Please give it a try and let us know how it goes.

 

Thanks and Regards,
Surbhi Maheshwari

 

View solution in original post

6 Replies

Avatar

Employee

Hi,

 

Hope you are doing well.

Can you please share the generated PDF's screenshot for the Content properties screenshot you shared in your query?

That will help us in understanding the requirement clearly.

 

Thanks and Regards,
Surbhi Maheshwari

Avatar

Level 4

Hi, Surbhi!

 

Thanks for the response! I'd be happy to clarify.

 

Here is the OT DITA output for the above scenario. The type=Other and othertype=Notes create this note output:

joshm19816095_0-1713380642257.png

 

Here is the Native PDF output using identical DITA and type, othertype:

joshm19816095_1-1713380825282.png

 

Hope this helps - let me know if you need anything else!

 

Thanks!

Josh

Avatar

Level 4

Please let me know if you need additional clarification and I'd be happy to provide it!

 

The bottom line is that we're looking for a way to completely customize the output of a note (not just the standard caution, warning, etc. options).

 

Thanks again!

Josh

Avatar

Employee

Hi,

 

Thanks for providing details. We have enough details to work on it. We will get back to you soon. 

 

Regards,

Surbhi Maheshwari

Avatar

Correct answer by
Employee

Hi,

 

Please try adding the following CSS to your templates's CSS file:

 

div[data-attr-othertype]>span.prefix-content {
  display:none;
}
div[data-attr-othertype]:before{
  content: attr(data-attr-othertype)": ";
}

 

In this case it will pick the value of othertype attribute and put it before the prefix-content (e.g. Note) in your example above. It should work for different values of type like danger, caution etc.

Please give it a try and let us know how it goes.

 

Thanks and Regards,
Surbhi Maheshwari

 

Avatar

Level 4

So far it's working well! You guys are good!!

 

Thanks again for your help!

Josh