CKContent is used in nested components. This
element tag in the template is replaced with a part of the template of its
grandparent component.
Example
- Template of a nested component ( This component is the parent of CKContent element.)
<b><cgikit name=Content /></b>
- Binding of a nested component
Content : CKContent {}
- Code of a nested component
class NestedComponent < CKComponent
include CKPartsMaker
end
- Template of a grandparent component
foo
<cgikit name=Nested>This is the nested component.</cgikit>
bar
- Binding of a grandparent component
Nested : NestedComponent {}
foo
<b>This is the nested component.</b>
bar
Another example is available in samples/Examples. In samples/Examples, CKContent element is used in HeaderFooter, which
defines the header and footer for all of the appication's pages.
Note: You can locate only one CKContent
element in the template of a given component.
Bindings
CKContent doesn't have any attribute.