Problem/Motivation

I need to add fields to a WebPage: name, url, image, mainEntityOfPage. How to do it?

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

evgeny2308 created an issue. See original summary.

damienmckenna’s picture

Category: Task » Support request
Priority: Major » Normal
yevhen2308’s picture

As I understand it, to add additional fields, for example a name for a SchemaWebPage, I have to create a commit?

damienmckenna’s picture

Title: Add fields » Add fields to WebPage schema
Version: 8.x-2.5 » 3.0.x-dev
Component: Code » Existing structures
Category: Support request » Feature request

Apologies, I thought the fields existed already, I'm surprised they don't.

The simplest thing to do would be to find equivalent plugins in other submodules, copy them to the schema_web_page/src/Plugin/metatag/Tag directory, rename them and update their contents as appropriate, then create a patch or merge request with the files.

yevhen2308’s picture

Thank you very much. I will try to do this

yevhen2308’s picture

Hello. Please remove the two branches 3415013 and 3415013-Add-new-fields-to-WebPage. Thank you

samberry’s picture

Hi,

I noticed some of the fields that I required were missing here, so I have added name, url, mainEntity, datePublished and dateModified.

ericdsd’s picture

Patch #8 works for me.

almunnings’s picture

Assigned: Unassigned » almunnings
Status: Active » Needs work

Merge requests/branches look a bit garbled.

I'd like to update the fork for 3415013-Add-new-fields-to-WebPage and add patch from #8, plus add mainContentOfPage.

I'll have a stab at cleaning this up.

almunnings changed the visibility of the branch 3415013-add-fields-to to hidden.

almunnings changed the visibility of the branch 3415013 to hidden.

almunnings changed the visibility of the branch 8.x-2.x to hidden.

almunnings changed the visibility of the branch 3.0.x to hidden.

almunnings’s picture

Assigned: almunnings » Unassigned
Status: Needs work » Needs review
StatusFileSize
new72 bytes

Merge request adds:

  • audience
  • mainContentOfPage
  • mainEntity
  • url
  • name
  • datePublished
  • dateModified

audience's type Audience contains:

  • @type
  • audienceType
  • name
  • alternateName
  • description
  • url
  • geographicArea

Static patch of MR attached,

almunnings’s picture

StatusFileSize
new15.02 KB

Attaching static patch of MR

yevhen2308’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

almunnings’s picture

Status: Fixed » Needs review