diff --git a/core/profiles/standard/config/entity.display.node.article.default.yml b/core/profiles/standard/config/entity.display.node.article.default.yml new file mode 100644 index 0000000..7d2c7a2 --- /dev/null +++ b/core/profiles/standard/config/entity.display.node.article.default.yml @@ -0,0 +1,23 @@ +id: node.article.default +uuid: 80d77580-8d66-46db-9400-a3a68c32b4bb +targetEntityType: node +bundle: article +viewMode: default +content: + body: + label: hidden + type: text_default + weight: '0' + settings: { } + field_tags: + type: taxonomy_term_reference_link + weight: '10' + label: above + settings: { } + field_image: + label: hidden + type: image + settings: + image_style: large + image_link: '' + weight: '-1' diff --git a/core/profiles/standard/config/entity.display.node.article.teaser.yml b/core/profiles/standard/config/entity.display.node.article.teaser.yml new file mode 100644 index 0000000..b79dff7 --- /dev/null +++ b/core/profiles/standard/config/entity.display.node.article.teaser.yml @@ -0,0 +1,24 @@ +id: node.article.teaser +uuid: 5ad10c77-fee4-423a-9f0f-157e2bb70004 +targetEntityType: node +bundle: article +viewMode: teaser +content: + body: + label: hidden + type: text_summary_or_trimmed + weight: '0' + settings: + trim_length: '600' + field_tags: + type: taxonomy_term_reference_link + weight: '10' + label: above + settings: { } + field_image: + label: hidden + type: image + settings: + image_style: medium + image_link: content + weight: '-1' diff --git a/core/profiles/standard/config/field.field.field_image.yml b/core/profiles/standard/config/field.field.field_image.yml new file mode 100644 index 0000000..1e484cd --- /dev/null +++ b/core/profiles/standard/config/field.field.field_image.yml @@ -0,0 +1,35 @@ +id: field_image +uuid: de9680bc-d9ed-4b45-8300-ae37dd47ad6d +type: image +module: image +active: '1' +settings: + uri_scheme: public + default_image: false + column_groups: + file: + label: File + columns: + - fid + - width + - height + alt: + label: Alt + translatable: true + title: + label: Title + translatable: true +storage: + type: field_sql_storage + module: field_sql_storage + active: '1' + settings: { } +locked: '0' +cardinality: '1' +translatable: '0' +entity_types: { } +indexes: + fid: + - fid +status: 1 +langcode: und diff --git a/core/profiles/standard/config/field.field.field_tags.yml b/core/profiles/standard/config/field.field.field_tags.yml new file mode 100644 index 0000000..cdadea2 --- /dev/null +++ b/core/profiles/standard/config/field.field.field_tags.yml @@ -0,0 +1,24 @@ +id: field_tags +uuid: af483ba8-e5d8-4706-8606-6f26e50495ed +type: taxonomy_term_reference +module: taxonomy +active: '1' +settings: + allowed_values: + - + vocabulary: tags + parent: 0 +storage: + type: field_sql_storage + module: field_sql_storage + active: '1' + settings: { } +locked: '0' +cardinality: '-1' +translatable: '0' +entity_types: { } +indexes: + tid: + - tid +status: 1 +langcode: und diff --git a/core/profiles/standard/config/field.instance.node.article.field_image.yml b/core/profiles/standard/config/field.instance.node.article.field_image.yml new file mode 100644 index 0000000..c5e853c --- /dev/null +++ b/core/profiles/standard/config/field.instance.node.article.field_image.yml @@ -0,0 +1,31 @@ +id: node.article.field_image +uuid: fccdb880-7613-4bbd-a708-8ed478943acb +field_uuid: de9680bc-d9ed-4b45-8300-ae37dd47ad6d +entity_type: node +bundle: article +label: Image +description: 'Upload an image to go with this article.' +required: false +default_value: { } +default_value_function: '' +settings: + file_directory: field/image + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + title_field: '' + alt_field_required: 0 + title_field_required: 0 + default_image: 0 + user_register_form: false +widget: + type: image_image + settings: + progress_indicator: throbber + preview_image_style: thumbnail + weight: -1 + module: image +status: 1 +langcode: und diff --git a/core/profiles/standard/config/field.instance.node.article.field_tags.yml b/core/profiles/standard/config/field.instance.node.article.field_tags.yml new file mode 100644 index 0000000..7ba4223 --- /dev/null +++ b/core/profiles/standard/config/field.instance.node.article.field_tags.yml @@ -0,0 +1,22 @@ +id: node.article.field_tags +uuid: fd5e2193-2d4b-431b-8000-b6c862d17e83 +field_uuid: af483ba8-e5d8-4706-8606-6f26e50495ed +entity_type: node +bundle: article +label: Tags +description: 'Enter a comma-separated list of words to describe your content.' +required: false +default_value: { } +default_value_function: '' +settings: + user_register_form: false +widget: + type: taxonomy_autocomplete + weight: -4 + settings: + size: '60' + autocomplete_path: taxonomy/autocomplete + placeholder: '' + module: taxonomy +status: 1 +langcode: und diff --git a/core/profiles/standard/standard.install b/core/profiles/standard/standard.install index a0594b0..741f857 100644 --- a/core/profiles/standard/standard.install +++ b/core/profiles/standard/standard.install @@ -93,122 +93,6 @@ function standard_install() { $user_settings = config('user.settings'); $user_settings->set('register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)->save(); - // Create a default field named "Tags" for the 'article' content type. - $field = array( - 'field_name' => 'field_tags', - 'type' => 'taxonomy_term_reference', - // Set cardinality to unlimited for tagging. - 'cardinality' => FIELD_CARDINALITY_UNLIMITED, - 'settings' => array( - 'allowed_values' => array( - array( - 'vocabulary' => 'tags', - 'parent' => 0, - ), - ), - ), - ); - field_create_field($field); - - $help = st('Enter a comma-separated list of words to describe your content.'); - $instance = array( - 'field_name' => 'field_tags', - 'entity_type' => 'node', - 'label' => 'Tags', - 'bundle' => 'article', - 'description' => $help, - 'widget' => array( - 'type' => 'taxonomy_autocomplete', - 'weight' => -4, - ), - ); - field_create_instance($instance); - - // Assign display settings for the 'default' and 'teaser' view modes. - entity_get_display('node', 'article', 'default') - ->setComponent($instance['field_name'], array( - 'type' => 'taxonomy_term_reference_link', - 'weight' => 10, - )) - ->save(); - entity_get_display('node', 'article', 'teaser') - ->setComponent($instance['field_name'], array( - 'type' => 'taxonomy_term_reference_link', - 'weight' => 10, - )) - ->save(); - - // Create an image field named "Image", enabled for the 'article' content type. - // Many of the following values will be defaulted, they're included here as an illustrative examples. - // See http://api.drupal.org/api/function/field_create_field/8 - - $field = array( - 'field_name' => 'field_image', - 'type' => 'image', - 'cardinality' => 1, - 'locked' => FALSE, - 'indexes' => array('fid' => array('fid')), - 'settings' => array( - 'uri_scheme' => 'public', - 'default_image' => FALSE, - ), - 'storage' => array( - 'type' => 'field_sql_storage', - 'settings' => array(), - ), - ); - field_create_field($field); - - - // Many of the following values will be defaulted, they're included here as an illustrative examples. - // See http://api.drupal.org/api/function/field_create_instance/8 - $instance = array( - 'field_name' => 'field_image', - 'entity_type' => 'node', - 'label' => 'Image', - 'bundle' => 'article', - 'description' => st('Upload an image to go with this article.'), - 'required' => FALSE, - - 'settings' => array( - 'file_directory' => 'field/image', - 'file_extensions' => 'png gif jpg jpeg', - 'max_filesize' => '', - 'max_resolution' => '', - 'min_resolution' => '', - 'alt_field' => TRUE, - 'title_field' => '', - ), - - 'widget' => array( - 'type' => 'image_image', - 'settings' => array( - 'progress_indicator' => 'throbber', - 'preview_image_style' => 'thumbnail', - ), - 'weight' => -1, - ), - ); - field_create_instance($instance); - - // Assign display settings for the 'default' and 'teaser' view modes. - entity_get_display('node', 'article', 'default') - ->setComponent($instance['field_name'], array( - 'label' => 'hidden', - 'type' => 'image', - 'settings' => array('image_style' => 'large', 'image_link' => ''), - 'weight' => -1, - )) - ->save(); - entity_get_display('node', 'article', 'teaser') - ->setComponent($instance['field_name'], array( - 'label' => 'hidden', - 'type' => 'image', - 'settings' => array('image_style' => 'medium', 'image_link' => 'content'), - 'weight' => -1, - )) - ->save(); - // Create user picture field. module_load_install('user'); user_install_picture_field();