View Single Post
Old 01-17-2021, 07:12 AM   #263
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,461
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Terisa de morgan View Post
I have a doubt. Let's say I have an action that includes to set some custom columns, that doesn't exist in all the libraries. Is it possible to execute the part that is common in all the libraries and the part about custom columns only in the libraries where they exist?
You can use current_library_name() in a template to determine if an action should run. However, this isn't ideal because the mapping from library name to columns is in your head and can change. Better would be an field_exists('name') boolean function. I will look at adding that.
chaley is offline   Reply With Quote