• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Learning DITA

Free DITA training

Free DITA training

  • Log in
  • Register
  • Newsletter
  • Profile
  • Privacy
  • Home
  • About
  • Courses
  • News
  • Resources
  • Support the site
  • Contact
  • Recordings

Review of content reference basics

Posted on 12.02.16

Advanced reuse in DITA Lesson 3: Advanced conrefs Review of content reference basics
Lesson Progress
0% Complete

In the Introduction to reuse in DITA course you learned how to use the conref attribute to reuse elements. The conref attribute allows you to pull content from one element (possibly from a different topic) into another element.

To use a content reference:

  • The referenced element (the information being pulled) must have an id attribute.
    <p id="use_me">This is a reusable paragraph.</p>
  • The referencing element (which is nominally empty) uses the conref attribute to specify the id of the containing topic and the id of the referenced element. For example:
    <p conref="#my_topic/use_me"/>

    or, if the referenced element is in another file:

    <p conref="topic_file.dita#my_topic/use_me"/>

The content reference is resolved when the topic containing the referencing element is processed for output. Some DITA editors can also display the referenced content (as read-only text).

Contributors
  • Simon Bate
  • Jake Campbell
  • Gretyl Kinsey
Previous Lesson
Back to Lesson
Next Topic

sidebar

Blog Sidebar

  • Scriptorium logo
    Maximize the value of your content. Read more.
  • Scriptorium logo
    Need DITA help? We offer flat-rate consulting. Get help.
  • Scriptorium logo
    Already in DITA and need support? Contact us.
RSSTwitter

Want to add content? Join the ditatraining GitHub repository.

  • Home
  • Sponsor
  • News
  • Contact
  • Privacy

Maintained by Scriptorium Publishing

Logo and site presentation © 2015-2021 Scriptorium Publishing. Content based on the open-source DITA training project.