Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

PLAT-24 Add metatags fieldset to News article content type #153

Merged
merged 4 commits into from
Apr 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions profiles/cr/modules/custom/cr_article/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ This module contains the CR article that shows.

|field_name|type|comment|
|--- | --- | --- | --- | --- |
|`field_article_intro`|`text_long`|This is used as a brief description of the body|
|`field_article_tag`|`taxonomy_term`|This is used for related articles|
|`field_article_publish_date`|`datetime`|This is used for specify a date for the article|
|`field_article_youtube_url`|`link`|This is for show a youtube video|
|`title`|`text`|Title of the article|
|`body`|Body of the article|
|`field_intro`|`text_long`|This is used as a brief description of the body|
|`field_tags`|`taxonomy_term`|This is used for related articles|
|`field_publish_date`|`datetime`|This is used for specify a date for the article|
|`field_youtube_url`|`link`|This is to show a youtube video|
|`field_image`|`image`|This is used to show a main image for the article|
|`field_meta_tags`|`metatag`|This is used to enter customised tags and values for SEO and social media for the article|

\* Includes Image from the profile.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dependencies:
- field.field.node.article.body
- field.field.node.article.field_image
- field.field.node.article.field_intro
- field.field.node.article.field_meta_tags
- field.field.node.article.field_publish_date
- field.field.node.article.field_tags
- field.field.node.article.field_youtube_url
Expand All @@ -13,6 +14,7 @@ dependencies:
module:
- datetime
- image
- metatag
- path
- text
- youtube
Expand Down Expand Up @@ -48,6 +50,11 @@ content:
rows: 5
placeholder: ''
third_party_settings: { }
field_meta_tags:
weight: 26
settings: { }
third_party_settings: { }
type: metatag_firehose
field_publish_date:
type: datetime_default
weight: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ dependencies:
- field.field.node.article.body
- field.field.node.article.field_image
- field.field.node.article.field_intro
- field.field.node.article.field_meta_tags
- field.field.node.article.field_publish_date
- field.field.node.article.field_tags
- field.field.node.article.field_youtube_url
- node.type.article
module:
- datetime
- metatag
- panelizer
- responsive_image
- text
Expand Down Expand Up @@ -162,6 +164,12 @@ content:
label: visually_hidden
settings: { }
third_party_settings: { }
field_meta_tags:
weight: 6
label: above
settings: { }
third_party_settings: { }
type: metatag_empty_formatter
field_publish_date:
type: datetime_default
weight: 0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_meta_tags
- node.type.article
module:
- metatag
id: node.article.field_meta_tags
field_name: field_meta_tags
entity_type: node
bundle: article
label: 'Meta tags'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: metatag
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
langcode: en
status: true
dependencies:
module:
- metatag
- node
id: node.field_meta_tags
field_name: field_meta_tags
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vireshpatel if this is an article specific field, it should be prepended with article, like field_article_meta_tags. If we're gonna reuse this field it can be named like it is now but then it should be part of the CR profile and not the cr_article module I believe. \cc @bimsonz

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pvhee @bimsonz:
field_meta_tags is intended to be reused for other types and just article - I'll move this to the CR profile.

I followed the implementation and naming convention currently in place for cr_article and also hence why I updated the architecture documentation. If the naming convention should be as you say @pvhee, then do we need to look at revising cr_article?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vireshpatel yes, could you put in a ticket pls? I think it's important we get this straight from the start

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pvhee no problem - ticket PLAT-152 created.

entity_type: node
type: metatag
settings: { }
module: metatag
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
4 changes: 4 additions & 0 deletions profiles/cr/modules/custom/cr_article/cr_article.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ dependencies:
- views
- taxonomy
- youtube
- metatag
- pathauto

config_devel:
- taxonomy.vocabulary.tags
Expand All @@ -31,6 +33,8 @@ config_devel:
- field.storage.node.field_publish_date
- field.field.node.article.field_image
- field.storage.node.field_image
- field.field.node.article.field_meta_tags
- field.storage.node.field_meta_tags
- field.field.node.article.field_youtube_url
- field.storage.node.field_youtube_url
- views.view.related_news
Expand Down