Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Way to reference Exisiting AEM Components in DITA Content

Avatar

Level 1

How to add AEM Components might be core components or any Banner / CTA component in DITA Content. I have seen this topic "Customize DITA element mapping with AEM components " https://helpx.adobe.com/content/dam/help/en/xml-documentation-solution/3-8-6/XML-Documentation-for-A... but doesn't look like helpful. If some one has implemented similar feature, please help me out.

1 Reply

Avatar

Level 3

I hope you already found the solution for the above. If you are still looking for examples please refer to the below steps:

 

  1. Overlay the "/libs/fmdita/config/elementmapping.xml" file
  2. You should find the overlay path here: /apps/fmdita/config/elementmapping.xml
  3. Create a DITA element which you would like to map, for example converting the default fmdita text component "fmdita/components/dita/text" to AEM OOTB text component "wcm/foundation/components/text"
  4. Update the elementmapping.xml in /apps directory with the below changes.
    <?xml version="1.0" encoding="utf-8"?>
    <ditacomponentmap>
    	<ditaelement>
    		<name>#text</name>
    		<componentpath>wcm/foundation/components/text</componentpath>
    		<type>STANDALONE</type>
    		<target>para</target>
    		<textprop>text</textprop>
    	</ditaelement>
    </ditacomponentmap>
  5. Using the same "text" as the property name, you need to change it to respective property name if you have a different name. Not changing the type as there are no more child elements in my example.
  6. The next main step is to update the configuration to pick up the overlay file.
  7. Navigate to Config Manager in system console.
  8. update the "Override Element Mapping" setting in the com.adobe.fmdita.config.ConfigManager bundle. It will be empty by default. update it with the path /apps/fmdita/config/elementmapping.xml and save the changes
  9. Now re-generate the site and it should use the AEM component instead of fmdita text component.

 

Attached few screenshots for reference:

elementmapping.pngConfigChange.pngtextcomponentresourcetype.png