mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3514] Added transclusions sections to doc files (#3756)
* [ADF-3514] Added transclusion sections and guide page * [ADF-3514] Updated tables of contents where needed * [ADF-3514] Updated index files
This commit is contained in:
committed by
Eugenio Romano
parent
35e1563fde
commit
2c49de6070
@@ -9,6 +9,7 @@ on an item below to see the corresponding guide page.
|
||||
- [Form Extensibility and Customisation](extensibility.md)
|
||||
- [Internationalization in ADF](internationalization.md)
|
||||
- [Theming](theming.md)
|
||||
- [Transclusion](transclusion.md)
|
||||
- [Typography](typography.md)
|
||||
- [Walkthrough - adding indicators to highlight information about a node](metadata-indicators.md)
|
||||
|
||||
|
41
docs/user-guide/transclusion.md
Normal file
41
docs/user-guide/transclusion.md
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
Added: v2.6.0
|
||||
---
|
||||
|
||||
# Transclusion
|
||||
|
||||
Several components in ADF make use of **transclusion**, which is the technique
|
||||
of incorporating user-supplied content in the body of a standard component. In
|
||||
most cases, this is used to make small customizations (for example, the various
|
||||
list components let you supply custom content to show when the list is empty).
|
||||
However, there are also a few "containers" whose entire content is set by the user
|
||||
with the container itself being mainly for convenient display and formatting
|
||||
(for example, the [Accordion component](../core/accordion.component.md)).
|
||||
|
||||
You supply the content you want to transclude between the opening and closing tags of
|
||||
the main component. In a few cases, this content can be completely free-form as with
|
||||
the body section of the [Login component](../core/login.component.md):
|
||||
|
||||
```html
|
||||
<adf-login ...>
|
||||
<div>
|
||||
<div>Your extra content</div>
|
||||
</div>
|
||||
</adf-login>
|
||||
```
|
||||
|
||||
More often, though, the main component makes use of one or more sub-components to add
|
||||
structure to the transclusion. For example, the [Login component](../core/login.component.md)
|
||||
also has sub-components for the header and footer regions in addition to the free-form
|
||||
content of the body:
|
||||
|
||||
```html
|
||||
<adf-login ...>
|
||||
<login-footer><ng-template>My custom HTML for the footer</ng-template></login-footer>
|
||||
</adf-login>
|
||||
```
|
||||
|
||||

|
||||
|
||||
The doc pages for the components that use transclusion contain full details of all
|
||||
supported sub-components and their usage.
|
Reference in New Issue
Block a user