Content Repository : content_type
This package is used to manipulate content types and attributes Content types represent the different kind of content displayed on a website. All content items should subclass a content type.
Create a new attribute for the specified type. Automatically create the column for the attribute if the column does not already exist.
Author: | Karl Goldstein | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns: | The id of the newly created attribute | |||||||||||||||
Parameters: | ||||||||||||||||
|
||||||||||||||||
Declaration: | ||||||||||||||||
function create_attribute ( content_type in acs_attributes.object_type%TYPE, attribute_name in acs_attributes.attribute_name%TYPE, datatype in acs_attributes.datatype%TYPE, pretty_name in acs_attributes.pretty_name%TYPE, pretty_plural in acs_attributes.pretty_plural%TYPE default null, default_value in acs_attributes.default_value%TYPE default null, column_spec in varchar2 default 'varchar2(4000)' ) return acs_attributes.attribute_id%TYPE; | ||||||||||||||||
See Also: | acs_object_type.create_attribute, content_type.create_type |
Retrieve the appropriate template for rendering items of the specified type.
Author: | Karl Goldstein | ||||||
---|---|---|---|---|---|---|---|
Returns: | The ID of the template to use | ||||||
Parameters: | |||||||
|
|||||||
Declaration: | |||||||
function get_template ( content_type in cr_type_template_map.content_type%TYPE, use_context in cr_type_template_map.use_context%TYPE ) return cr_templates.template_id%TYPE; | |||||||
See Also: | content_item.register_template, content_item.unregister_template, content_item.get_template, content_type.unregister_template, content_type.register_template, content_type.set_default_template |
Parameters: | |
---|---|
Not yet documented | |
Declaration: | |
function is_content_type ( object_type in acs_object_types.object_type%TYPE ) return char; |
Create a new content type. Automatically create the attribute table for the type if the table does not already exist.
Author: | Karl Goldstein | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters: | ||||||||||||||||||||||
|
||||||||||||||||||||||
Declaration: | ||||||||||||||||||||||
procedure create_type ( content_type in acs_object_types.object_type%TYPE, supertype in acs_object_types.object_type%TYPE default 'content_revision', pretty_name in acs_object_types.pretty_name%TYPE, pretty_plural in acs_object_types.pretty_plural%TYPE, table_name in acs_object_types.table_name%TYPE default null, id_column in acs_object_types.id_column%TYPE default 'XXX', name_method in acs_object_types.name_method%TYPE default null ); | ||||||||||||||||||||||
See Also: | acs_object_type.create_type |
Drop an existing attribute. If you are using CMS, make sure to call cm_form_widget.unregister_attribute_widget before calling this function.
Author: | Karl Goldstein | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Parameters: | ||||||||||
|
||||||||||
Declaration: | ||||||||||
procedure drop_attribute ( content_type in acs_attributes.object_type%TYPE, attribute_name in acs_attributes.attribute_name%TYPE, drop_column in varchar2 default 'f' ); | ||||||||||
See Also: | acs_object.drop_attribute, content_type.create_attribute, cm_form_widget.unregister_attribute_widget |
Create a view for the type which joins all attributes of the type, including the inherited attributes. The view is named "
Author: | Karl Goldstein | |||
---|---|---|---|---|
Parameters: | ||||
|
||||
Declaration: | ||||
procedure refresh_view ( content_type in cr_type_template_map.content_type%TYPE ); | ||||
See Also: | content_type.create_type |
Register a parent-child relationship between a content type and another object type. This may then be used by the content_item.is_valid_relation function to validate the relationship between an item and a potential child.
Author: | Karl Goldstein | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters: | ||||||||||||||||
|
||||||||||||||||
Declaration: | ||||||||||||||||
procedure register_child_type ( parent_type in cr_type_children.parent_type%TYPE, child_type in cr_type_children.child_type%TYPE, relation_tag in cr_type_children.relation_tag%TYPE default 'generic', min_n in integer default 0, max_n in integer default null ); | ||||||||||||||||
See Also: | content_type.register_relation_type, content_type.register_child_type |
Parameters: | |
---|---|
Not yet documented | |
Declaration: | |
procedure register_mime_type ( content_type in cr_content_mime_type_map.content_type%TYPE, mime_type in cr_content_mime_type_map.mime_type%TYPE ); |
Register a relationship between a content type and another object type. This may then be used by the content_item.is_valid_relation function to validate any relationship between an item and another object.
Author: | Karl Goldstein | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters: | ||||||||||||||||
|
||||||||||||||||
Declaration: | ||||||||||||||||
procedure register_relation_type ( content_type in cr_type_relations.content_type%TYPE, target_type in cr_type_relations.target_type%TYPE, relation_tag in cr_type_relations.relation_tag%TYPE default 'generic', min_n in integer default 0, max_n in integer default null ); | ||||||||||||||||
See Also: | content_type.unregister_relation_type |
Register a template for the content type. This template may be used to render all items of that type.
Author: | Karl Goldstein | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters: | |||||||||||||
|
|||||||||||||
Declaration: | |||||||||||||
procedure register_template ( content_type in cr_type_template_map.content_type%TYPE, template_id in cr_templates.template_id%TYPE, use_context in cr_type_template_map.use_context%TYPE, is_default in cr_type_template_map.is_default%TYPE default 'f' ); | |||||||||||||
See Also: | content_item.register_template, content_item.unregister_template, content_item.get_template, content_type.unregister_template, content_type.set_default_template, content_type.get_template |
Make the registered template a default template. The default template will be used to render all items of the type for which no individual template is registered.
Author: | Karl Goldstein | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Parameters: | ||||||||||
|
||||||||||
Declaration: | ||||||||||
procedure set_default_template ( content_type in cr_type_template_map.content_type%TYPE, template_id in cr_templates.template_id%TYPE, use_context in cr_type_template_map.use_context%TYPE ); | ||||||||||
See Also: | content_item.register_template, content_item.unregister_template, content_item.get_template, content_type.unregister_template, content_type.register_template, content_type.get_template |
Register a parent-child relationship between a content type and another object type. This may then be used by the content_item.is_valid_relation function to validate the relationship between an item and a potential child.
Author: | Karl Goldstein | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Parameters: | ||||||||||
|
||||||||||
Declaration: | ||||||||||
procedure unregister_child_type ( parent_type in cr_type_children.parent_type%TYPE, child_type in cr_type_children.child_type%TYPE, relation_tag in cr_type_children.relation_tag%TYPE default null ); | ||||||||||
See Also: | content_type.register_relation_type, content_type.register_child_type |
Parameters: | |
---|---|
Not yet documented | |
Declaration: | |
procedure unregister_mime_type ( content_type in cr_content_mime_type_map.content_type%TYPE, mime_type in cr_content_mime_type_map.mime_type%TYPE ); |
Unregister a relationship between a content type and another object type.
Author: | Karl Goldstein | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Parameters: | ||||||||||
|
||||||||||
Declaration: | ||||||||||
procedure unregister_relation_type ( content_type in cr_type_relations.content_type%TYPE, target_type in cr_type_relations.target_type%TYPE, relation_tag in cr_type_relations.relation_tag%TYPE default null ); | ||||||||||
See Also: | content_type.register_relation_type |
Unregister a template. If the unregistered template was the default template, the content_type can no longer be rendered in the use_context,
Author: | Karl Goldstein | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Parameters: | ||||||||||
|
||||||||||
Declaration: | ||||||||||
procedure unregister_template ( content_type in cr_type_template_map.content_type%TYPE default null, template_id in cr_templates.template_id%TYPE, use_context in cr_type_template_map.use_context%TYPE default null ); | ||||||||||
See Also: | content_item.register_template, content_item.unregister_template, content_item.get_template, content_type.set_default_template, content_type.register_template, content_type.get_template |
Last Modified: $Id: type.html,v 1.3 2018/03/27 11:17:59 hectorr Exp $