Generate an HTML display of an fs-traversal relationship path.
-
Include the JavaScript and CSS on the page.
<script src="fs-traversal-relationship-display.js"></script> <link rel="stylesheet" href="fs-traversal-relationship-display.css">
-
Pass the result of
FSTraversal.
pathTo(id)
directly intoFSTraversalRelationshipDisplay
to generate the HTML display.var path = traversal.pathTo(personId); var relationshipHTML = FSTraversalRelationshipDisplay(path);
-
Add the HTML to the DOM.
-
Optional: You may specify a language.
FSTraversalRelationshipDisplay(path, 'es');
Currently only English
en
and Spanishes
are supported. Defaults toen
.