<@td.content>
This tag contains the following attributes:
-
addPageviewImage
- Whether to automatically insert an HTML <img> tag
after the rendered
content that will request a 1x1-pixel,
invisible image causing the server to record
a view of this
content. This will force a pageview to be recorded, even if the
rendered
page is served from a browser or other cache.
- Required: false
- Type: Boolean
- Default: false
- Since: 4.2
-
assembly
- An Assembly whose content to render. One of
this,
'url',
or 'searchTerm' must be specified, and they
are evaluated
in that
order.
- Required: false
- Type: Assembly
- Default: None
-
assemblyTopicRef
- If an assembly is specified, this is the ID of
the
topic within
that assembly to render. If an assembly
is specified
without this
attribute,
the assembly map
itself is rendered. this
is specified without an
assembly,
it is ignored.
- Required: false
- Type: String
- Default: None
-
contextKey
- The context key. Overridden by contextUrl
and/or
contextUrlString and/or the context key specified
in
url/urlString, in
that order.
- Required: false
- Type: String
- Default: none
-
contextUrl
- The ContentLocator of the context from which to load the
data. Used to
configure hyperlinks and image references
in the
resulting content.
- Required: false
- Type: ContentLocator
- Default: none
-
contextUrlString
- The ContentLocator of the context from which to load the
data. Used to
configure hyperlinks and image references
in the
resulting content.
- Required: false
- Type: String
- Default: none
-
expandReferences
- Whether to expand references to child documents. This
is used to render all topics in a DITA Map-based publication on
a
single page.
- Required: false
- Type: boolean
- Default: false
-
ignoreCache
- Whether to go to the database, ignoring caches.
Note
that
this will flush the requested data from the
cache and
re-cache the newly
loaded version. Default is
false.
- Required: false
- Type: boolean
- Default: none
-
itemKey
- The item key. Overridden by url and/or
urlString.
- Required: false
- Type: String
- Default: none
-
linkContext
- This attribute is deprecated and can be ignored.
- Required: false
- Type: Boolean
- Default: none
-
pipeline
- Post-transform content processing can be accomplished
with
built-in content processing pipelines. Currently the only
supported pipeline
is
"filterchain:/harp/portal/markFilteredTopics.xml", which can
mark or remove
links to topics not available in the portal, and
requires
pipelineParameters
"portal" (PortalIdentity),
"contextKey" (ItemIdentifier), and
"removeFilteredEntries",
a
boolean controlling whether to remove or simply mark links to
filtered content.
- Required: false
- Type: String
- Default: None
-
projectKey
- The Project key. Overridden by url and/or
urlString.
- Required: false
- Type: String
- Default: none
-
recordPageview
- Whether to record a pageview for the given content in
the reporting system. This should only be true when viewing
content
in a custom portal page. The built-in content viewing
pages all
record the pageview before the response is rendered.
But when
rendering content on a custom portal page, this should
be specified
as true to ensure that the content view is recorded.
- Required: false
- Type: boolean
- Default: false
-
searchTerm
- A search term whose first result will be the
SearchResultDocument rendered by this tag.
Overrides url and
contextUrl attributes. Required if url attribute not
provided.
Can be combined with metadata specified in
metadataFilterTags.
- Required: false
- Type: String
- Default: none
-
timeout
- The amount of time, in ms, after which the transform
may be
cancelled. The default value is generally 60000 (60
seconds), though this
can vary depending on the application's
configuration. Set to 0 to
disable
timeouts, but do this with
care; infinitely-running transforms can severely
degrade
application performance site-wide.
- Required: false
- Type: long
- Default: 60000
- Since: 4.2
-
url
- The ContentLocator object describing the content to
retrieve. Required if searchTerm attribute is not
provided.
- Required: false
- Type: ContentLocator
- Default: none
-
urlString
- The ContentLocator object describing the content to
retrieve. Required if searchTerm attribute is not
provided.
- Required: false
- Type: String
- Default: none
-
xsl
- Relative path to an XSLT file, relative to the
WEB-INF directory of the web application, to apply to
the
content. Parameters to the XSLT can be passed using
nested
xslParam
tags.
- Required: false
- Type: String
- Default: none
Rendering a DITA Map as One Page
The expandReferences
attribute can be used when referencing DITA maps to
insert an XML document containing all of the topics in the publication, instead of
the
flattened DITA map markup. The XML structure for this document is similar, but not
quite the
same, as the structure used by the DITA Open Toolkit when rendering PDF output.
- The root element is the map's root element.
- The first child of the root element is
<opentopic:map xmlns:opentopic="http://www.idiominc.com/opentopic">
.- This structure contains the original, unexpanded map structure, including the map title element.
- On each topicref, the ID of the corresponding topic element is in the
puckdita:cxt-topicId
attribute (xmlns:puckdita="http://www.titaniasoftware.com/namespace/puck-saxfilter-dita"
). - The metadata, including navtitle, for each topicref will have been resolved.
- After the
<opentopic:map>
element, all of the topics referenced by the map flow, nested as specified by the map. Navtitle-only topicrefs are rendered as topics with the appropriate title. Theid
attribute maps to thepuckdita:cxt-topicId
attribute for its topicref in the<opentopic:map>
section. - The
@href
attribute on allscope="local" format="dita"
links and cross-references will have already been converted into IDREF-style links (e.g.href="#targetId"
) that will resolve in the flattened document. - Related links, including those generated from reltables and the map structure, will
be
included in the topics. To avoid displaying them they must be excluded by the stylesheet.
You can differentiate authored links from generated links using the
puckdita:linkSource
attribute. If the attribute is not present, then the link was manually authored. Otherwise:"structure"
- The link is derived from the map structure.
"reltable"
- The link was generated from a reltable.
Viewing an XML Document as Transformed HTML
<@td.content url=itemUrl xsl="/topic/topic.xsl"> <@td.xslParam name="GENERATE-TASK-LABELS" value=true/> <@td.xslParam name="TASK-LABEL-TAG" value="h4"/> </@td.content>
This tag will render the content identified by the
ContentLocator object
itemUrl
using the XSLT
transformation in the portal theme at
/xsl/topic/topic.xsl
. It will
pass two parameters to the XSLT,
GENERATE-TASK-LABELS=true
and
TASK-LABEL-TAG=h4
.
Viewing a Contextualized Topic
<@td.content url=itemUrl contextUrl=contextUrl xsl="/topic/topic.xsl"/>
This loads the topic identified by the ContentLocator
itemUrl
, as referenced by the DITA map identified by
contextUrl
.
Rendering Content Based on Search
<@td.content searchTerm="serialno:12345" xsl="/topic/topic.xsl"/>
This will render the first document matching the given search.
Rendering an Assembly
<@td.content assembly=assemblyObj xsl="/map/map.xsl"/>
This will render the Assembly object give by
assemblyObj
.
Rendering an Assembly Entry
<@td.content assembly=assemblyObj assemblyTopicRef=refId xsl="/topic/topic.xsl"/>
This will render a topic within Assembly object give by
assemblyObj
and refId
, the identifier of the topic
within the assembly.
Rendering All Topics in a DITA Map
<@td.content url="itemUrl" xsl="/map/monolith.xsl" expandReferences=true/>
This will use a version of the specified DITA map (or assembly) that is similar to, but not the same as, the monolithic XML structure used by the DITA Open Toolkit for PDFs.
Monolithic DITA Map XML Structure
Here is an example of what a DITA map rendered with expandReferences=true
might look like.
<map xmlns:puckdita="http://www.titaniasoftware.com/namespace/puck-saxfilter-dita" xmlns:opentopic="http://www.idiominc.com/opentopic"> <opentopic:map> <title>Map Title</title> <topicref puckdita:cxt-topicId="topic1"> <topicmeta> <navtitle>Topic One</navtitle> </topicmeta> <topicref puckdita:cxt-topicId="topic2"> <topicmeta> <navtitle>Topic Two</navtitle> </topicmeta> </topicref> </topicref> <topicref puckdita:cxt-topicId="topic3"> <topicmeta> <navtitle>Topic Three</navtitle> </topicmeta> </topicref> </opentopic:map> <topic id="topic1"> <title>Topic One</title> <!-- ... --> <topic id="topic2"> <title>Topic Two</title> <body> <p><xref href="#topic3">Topic 3</xref></p> </body> </topic> </topic> <topic id="topic3"> <title>Topic Three</title> <!-- ... --> </topic> </map>