-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closes #2547 Add ability to customize publication types. #2574
base: main
Are you sure you want to change the base?
Conversation
Looks like this PR works as expected, with no change in the output, and just an additional option in field_az_publication_type and we can filter on it in the search view. |
The options currently listed for the type are from the Citation Style Language Standard. This type field is used to determine what special cases are used in the style rendering. I'm not sure if this will cite books correctly...I think many styles will treat this as a generic type that doesn't meet any of the checks for types that have specific rules associated with them. Are the publications in question a collection/anthology? Those are typically cited as Book but with a container (Ordinarily books do not have a container) I've wondered if maybe we need a layer of abstraction from the types a visitor sees versus what's presented to the CSL processing (perhaps a taxonomy vocabulary that lists what types are available on the site, with a field for a mapping for what CSL type they actually use). This would allow for arbitrary names for the publication types maybe... |
…l/az_quickstart into issue-2547-add-article-in-book
…-2547-add-article-in-book
modules/custom/az_publication/src/AZPublicationTypeListBuilder.php
Outdated
Show resolved
Hide resolved
There can be a follow-up to integrate draggable list builder https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Config%21Entity%21DraggableListBuilder.php/class/DraggableListBuilder/9 |
…l/az_quickstart into issue/2547-add-article-in-book
Co-authored-by: Brian Berndt <[email protected]>
if (!empty($cslItem->additionalLinks)) { | ||
$renderedText .= ' ' . $cslItem->additionalLinks; | ||
} | ||
return preg_replace('#<div class="csl-left-margin">(.*?)</div>#', '', $renderedText); | ||
$dom = new DOMDocument(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does switching to DOM-based parsing here resolve an issue with the current regex-based parsing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure anymore, but line 309 says not to parse HTML with regex.
@@ -620,7 +624,7 @@ display: | |||
admin_label: 'field_az_authors: Author' | |||
plugin_id: standard | |||
required: false | |||
use_ajax: true | |||
use_ajax: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an intended change?
This was a local build problem for me, disregard sorry. I was testing the database update by upgrading a site from a previous version and composer hadn't yet applied the patch for the entityreference filter. |
Description
Adds a new configurable entity type called 'publication type'.
Adds a core patch from a merge request on issue #3347343
Creates a mechanism where site owners can create arbitrary publication types and map them to supported types in citation style language
This way the list of types is editable for both the field on the publication content type and within views with exposed forms for filters.
Adds a new configuration entity for each supported type. See the article type as an example
Related issues
Closes #2547
How to test
Enable az_publication
Add a new publication
Select Article in Book as the type.
See what happens.
Types of changes
Arizona Quickstart (install profile, custom modules, custom theme)
Drupal core
Drupal contrib projects
Checklist
Allows changing the filter from something like.
To a more manage-able