Closed (fixed)
Project:
Schema.org Metatag
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Nov 2017 at 17:51 UTC
Updated:
20 Jan 2018 at 18:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
shaundychkoComment #3
shaundychkoComment #4
shaundychkoNeeds some code sniffer cleanup.
Comment #5
shaundychkoComment #6
shaundychkoI didn't mean to code-cleanup an unrelated file.
Comment #7
shaundychkoComment #8
christophweber commentedWorks as advertised. Thanks ShaunDyko!
Comment #9
karens commentedA couple notes:
- isAccessibleForFree is a valid item on things other than web pages, it can also go on Events and Places, according to Schema.org. So it should be added as a base tag and then included on those.
- The second element is 'hasPart', which Google is using to find the part of the page that is paywalled. But that element can also be used for other things. Google's method is applicable to all the written content, so could go on WebPage, Article, or any kind of CreativeWork. So again I think this needs to be a base tag that is extended in those places. This one is trickier because the current need is only for paywall info, but it could apply to other things in the future.
I have to think about the best way to set this up without closing off things that might be required in the future.
Comment #11
karens commentedMoved these classes to be base classes and added them to Article and Event as well. I remove the alter() code that removes an element if the classes are empty. That is different than the way anything else works so it will be a maintenance and UX problem. I just altered the descriptions to make it clear that if you fill out one you need to fill out the other. Since classes have to be hard-coded (no token is going to do that) and isAccessibleForFree also will have to be hard-coded, no reason to have something "magic" updating things behind the scenes. Just fill out both.
Thanks!
Comment #12
karens commented