User account menu

  • Log in
BXTra.net

Breadcrumb

  • Home
  • Drupal 10 - ECA to Set Media Name automatically when Node update

Drupal 10 - ECA to Set Media Name automatically when Node update

By BXTra | 9:46 AM PST, Mon November 27, 2023
ECA: Event - Condition – Action
Drupal
Views

I tried to use Media in my new project.  Any files to upload comes directly from scanner with default filename format contain only scanned date. To upload such file, there is nothing meaningful for user to search for to reuse it.  I tried to look for the way to set Media name automatically but I couldn't find it.  Therefore, I turned to ECA which I think this should work for this task.

With ECA, I use Views to get a list of Media used in such node.  Then, loop over the list and set Media name to include, node created date + node title + media created date.  That way, I can use Views to search for Media name and reused it.

Below is my set up : 

Drupal 10 - ECA to Set Media Name automatically when Node updateDrupal 10 - ECA to Set Media Name automatically when Node updateDrupal 10 - ECA to Set Media Name automatically when Node update

 

 

Drupal 10 - ECA to Set Media Name automatically when Node updateDrupal 10 - ECA to Set Media Name automatically when Node update

Once, I set it up, whenever I update the node, All Media files in such node will be renamed to what I set. When use it together with Entity Browser in View widget, I can use exposed Media name filter to search for Media needed to reuse.

About text formats
  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.

  • Will the router get the Openvpn as a client option?
    6 years ago
  • cancellation
    6 years 1 month ago
  • Router ASUS RT-N12 D1 tomatoes passwort falsch
    7 years 8 months ago
  • WPS button = 30/30/30 hard reset button
    7 years 9 months ago
  • Save my day!
    8 years 3 months ago
  • How to
    8 years 6 months ago
  • Can i still access my modem (the one with the ISP provided)?
    8 years 6 months ago
  • A saving step!
    8 years 10 months ago
  • Problem with Asus n12e-c1
    8 years 11 months ago
  • don't use Hostgator
    9 years 2 months ago

© 2007 - 2023 BXTra.net. All Rights Reserved. 
Certain other content, photos and artwork displayed on BXTra.net are protected by copyright and are the property of their respective owners.

Privacy Policy