Talking Drupal Newsletter #349
Episode #349 Storage Entities
Today we are talking about Storage Entities with Martin Anderson-clutz.
TD site update
Benefit of new entity type
Comparison to custom entity
Lightweight by design
Inline entity form
Martin Anderson-Clutz - @mandclu
Nic Laflin - www.nLighteneddevelopment.com @nicxvan
John Picozzi - www.epam.com @johnpicozzi
Mike Herchel - herchel.com - @mikeherchel
Module of the Week
Provides a preview link that is tokenised, and therefore bypasses access control to allow any user to view the latest revision of an entity.
Sharing Through Contrib
Talking Drupal guest and guest host, Martin Anderson-Clutz, works in pre-sales at Acquia. He often finds himself building narrow scope pieces of functionality to demonstrate the power of Drupal. When time permits and the feature is right, he shares it with the community through a contrib module. Some of his recent contributions include:
This module provides a table for content administrators to quickly review all content of a specific content entity type (e.g. node, taxonomy term, etc) and bundle (content type, vocabulary, etc).
Each configured field will be shown in a column, and the data for that field shown for each row. Additionally, operations links (edit, delete, etc) will be added based on the permissions for the current user.
The idea is to emulate the grid view provided in popular database administration tools, as a quick way to review available data.
Flag Assign User
Provides a form (with an associated permission) to allow a site administrator to assign a flag to another user for a specific piece of content.
Why would you need this? Here's an example use case: Suppose you're using the Flag Bookmark example that ships with the Flag module. You have a new employee starting, and when they log into the employee portal, you want them to see the most commonly used resources already bookmarked: employee manual, HR policies, etc. Instead of having to log into their account or use a solution like Masquerade, this allows you to bookmark the key content on their behalf.
Content Moderation Link
This module allows editors to move content to a different workflow state by
accessing a specially crafted URL, for example:
Note that the last three parts of the URL are meant to provide:
- the machine name of the target workflow state (e.g. draft or published)
- the machine name of entity type (e.g. node)
- one or more IDs that should be processed
Note that this module currently uses existing permissions, so to use the link a
user must be authenticated (they will be redirected to the login page if not)
and have permission to use the transition needed from the content's current
state to the target state.
A possible use case for this functionality is providing administrators with "one click" moderation links to publish (or otherwise move in a workflow) one or more pieces of content, from within another system, for example, an email or Slack message.
Search API Solr Boost By User Term
This module allows a site to boost Solr query results where the content has a taxonomy term reference that matches a selection in a field on the current user. For example, if your site had a taxonomy for animals, and a user had set their favourite animal as "elephant" in their user profile, the module would cause content tagged with "elephant" to appear higher in the search results.
To use it, add the "Boost by User Term" filter to your Solr-based search view. You'll be able to select which user field to get the value from, and which node field to add the boost for. Support for additional entities (beyond nodes) is likely possible, and may be added later on. It's also worth noting that the boost should work on non-node entities too, if the machine name matches a node field.
It's possible to add more than one such boost, with a different boost value. For example, an ecommerce site could boost results for products with a strong boost for gender, a medium boost on favourite colour, and weak boost on favourite category.
It's also worth noting that this modules doesn't (yet) perform any validation that the vocabulary targets for the two taxonomy terms reference field actually align (e.g. use a common vocabulary), but at worst this would mean that no search results get boosted.
#351 Core Theming $h!t with Mike Herchel Recording on June 7.
#352 D7 to D9 Migration with Mauricio Dinarte. Recording on June 14.
#353 Web Components with Ron Northcutt. Recording on June 21.
#354 OpenSource.com with AmyJune Hineline. Recording on June 28.
Drupaljam Re:United 6/1, Virtual and in-person
DrupalCamp Spain 2022 6/3 - 6/5, In-person
Drupal Mountain Camp 6/23 -6/26, In-person
Drupal Camp Asheville 2022 7/8 -7/9, In-person
DrupalCamp Colorado 8/5 - 8/6, In-person and virtual
DrupalCamp Atlanta 9/16 - 9/17, In-person
Drupal Providence Meetup - Open Mic Night 6/2. Virtual.
Tampa Bay Drupal User Group 6/2. In-person.
Melbourne Drupal meetup - June 2022 6/9. Virtual.
SFDUG - June 9 - The Importance of Retention: Moving from Drupal 6,7 or 8 to Drupal 9 or 10 6/9. Virtual.
How to make / improvise your own accessibility and adaptive devices and mods. Crash Course.
@talkingdrupal on Twitter
#talkingdrupal on Drupal Slack