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

Broken file references in AEM pages

Avatar

Level 1

hello, 

when I try to use any internal references or documents available inside AEM DAM to topics it works in the preview mode and when publishing the same content to AEM site pages It is rendered as plain texts instead of reference links in the pages. 
workaround : publish the documents to publish server and use the complete link. 

This is observed on guides version 4.0.3 and aem 6.5.11

kindly provide a fix for this. 

2 Replies

Avatar

Level 3

Please follow the below steps to add the non-dita file references. 

 

1. Overlay the elementmapping.xml file from /libs/fmdita/config/elementmapping.xml to your custom folder under apps.

 

2. Add the following code to the xml file (Eg. PDF format)

 

<ditaelement>

    <name>xref</name>

    <class>- topic/xref</class>

    <componentpath>fmdita/components/dita/link</componentpath>

    <type>COMPOSITE</type>

    <target>para</target>

    <textprop>text</textprop>

    <xpath><![CDATA[//xref[@format='pdf']]]></xpath>

    <attributemap>

      <attribute from="href" to="link" ispath="true" rel="SOURCE" />

      <attribute from="format" to="format" />

      <attribute from="scope" to="scope" />

    </attributemap>

  </ditaelement>

 

3. Update the Override Element Mapping setting in the com.adobe.fmdita.config.ConfigManager configuration and save it.

 

AswiniLakshminarayanan_4-1670011752927.png

4. Add the format attribute for the file reference.

AswiniLakshminarayanan_5-1670011783869.png