In Drupal 7, the Display Suite module offered a thing called Custom Fields, which allowed me to define a field created by custom php code that was fired upon the viewing of a node. I found this to be very powerful, as it allowed an easy way to  display data that was pertinent to the current situation of things. This is in contrast to the computed field, which fires its code upon saving of a node.

Is there a way to do this in Backdrop?

Accepted answer

Hey All !!!

Check it out: the answer was right in front of my face the whole time. I don't know why I didn't already know this. The solution:

The Computed Field has two sections of code... The first is executed upon saving of the node; the second is executed upon displaying the node. So this solves my current requirements.

Case dismissed.

Comments

There is a port of the Display Suite module that I started a while back, but I have not made a full release of it yet because I did not have an upgrade path for it. If you could check it out and let me know if anything is broken, that would be really helpful with getting it finished.

https://github.com/backdrop-contrib/ds

I'll check it out...

but here's the problem: Backdrop has made module installation so easy, and I've become so lazy... that I now have no idea how to get from the link you provided to an installed module. "Which files do I put where?" I guess is the current question...

Thanks.

Hey All !!!

Check it out: the answer was right in front of my face the whole time. I don't know why I didn't already know this. The solution:

The Computed Field has two sections of code... The first is executed upon saving of the node; the second is executed upon displaying the node. So this solves my current requirements.

Case dismissed.

Display Suite module working.

But Add a code field, Add a dynamic field, Add a block field, Add a preprocess field - not working.

And:

my_site/admin/structure/ds/fields/manage_block

or

my_site/admin/structure/ds/fields/manage_custom

or

my_site/admin/structure/ds/fields/manage_dynamic

or

my_site/admin/structure/ds/fields/manage_preprocess

- result:

Fatal error: Call to undefined function dpm() in my_site/modules/ds/modules/ds_ui/includes/ds.fields.inc on line 182


I need "Add a block field".

(sorry for my English!)