Quantcast
Channel: Question and Answer » formatters
Viewing all articles
Browse latest Browse all 10

Custom field formatter to create byline?

$
0
0

I’m using the taxonomy module for authors on a site, which is sometimes recommended as a flexible way to store and display author information, since it makes it easy to list content by author.

For some content types, I want to create a byline that looks something like this:

by [author] on [date]

In a first pass on a solution, I’ve created a custom field formatter that pretty much does what I want, and allows the user to choose author, or author + date for term reference fields. It does show up as an option on all term reference field, not sure if there’s a way to restrict that or not(?)

Before I go much farther with the solution, I wanted to check: with Drupal 7, is a field formatter the right way to approach this problem? Are there other approaches I should consider that that are easier, more flexible, etc?


Viewing all articles
Browse latest Browse all 10

Trending Articles