This would be VERY helpful for site development, and potentially beneficial as a persistent feature on a production site.
I'm pretty sure I did this on an old D7 site of mine, but that was, like, years ago. And since everything is changing fast, I am now seeking advice on what would be the "best practice" method(s) for
- Displaying the content type (probably at the top of the node display) with the output of a node.
Some ideas (which I assume could work, but don't know how):
- Edit the tpl file for various node types
- Create a custom field for various content types (and display it)
No. 1 would be fast and would apply to many content types at once (and is also easily disabled when no longer wanted). No. 2 would take more time, but would have the benefit of being able to manipulate and display the field differently for different display formats, and with Views. What I am missing is the php function call that will produce a string equivalent to the content type. Any assistance is greatly appreciated.
Thanks, —Eric
As for outputting the content type in a node's template file, here's how to do that:
Add that to
node.tpl.php
.