You can use a S-Tag for this function. This will populate either  "in honor of" or "in memory of" based on the type of donation placed.

[[?[[S120:dc:isTributeDonation]]::true::in honor of::]]
[[?[[S120:dc:isMemorialDonation]]::true::in memory of::]]