Include a Partial (Reusable Content Snippet)
The most obvious partial you’ll see included in the DFCS policies is the policy-header.adoc partial. This partial provides a template of the table present at the beginning of the policy documents and several appendix documents. For information specifically about the policy-header.adoc partial, see the policy document header structure.
Partial files
Partials are AsciiDoc files that contain reusable snippets of content. They’re saved in the partials directory of a module. Regardless of a partial’s source module, it can be inserted into any other page or partial in the PAMMS site using the include directive and the partial file’s resource ID.
include::version@component:module:partial$file.adoc[]
Insert a partial
An entire partial (or a portion of) is inserted into a page using the include directive and file’s resource ID.
When inserting a partial using the include directive, use the partial’s resource ID with the family$
coordinate.
The family coordinate for partials is partial$
.
Like the resource ID in an xref, the more a page and the partial are related, the less coordinates you have to specify.
include::partial$policy-header.adoc[]
include::ROOT:partial$system-notification.adoc[] include::tanf:partial$definitions.adoc[]
include::help::partial$support.adoc[]
Insert tagged content from a partial
To include a snippet of content from a partial (instead of the whole file), use the tag
directive.
This page discusses how to develop applications to function in times of node or network failure. // tag::failover-definition[] (1) (2) -- Failover is the means by which a node is removed from the cluster and all its owned vBuckets are immediately: * Transferred to a replica node (if there are replica nodes) * Marked offline (if there are no replica nodes). -- // end::failover-definition[] (3) (4)
1 | To indicate the start of a tagged region, insert a comment line (// ) in the file. |
2 | Assign a unique name to the region in the tag directive, followed by a set of square brackets ([] ).
In this example the tag is called failover-definition. |
3 | Insert a comment line where you want the tagged region to end. |
4 | Assign the name of the region you want to terminate to the end directive. |
To insert a tagged region into a page, enter the resource ID and tag attribute in the include directive.
If you received this error message, you might have a failover condition. include::6.0@sdk-common:shared:partial$env-errors.adoc[tag=failover-definition]