Display Suite, Custom code field & PHP

joe.price's picture

Recently, I needed to customize the standard 'Read more' link that Display Suite provides, based on the taxonomy term of the nodes. There are a few ways to do this but a Custom code field turned out to be a simple and effective solution.

In the following code, I output the term name as a class for the Read more link. If you need any entity info, use Display Suite Code (this allows the use of $entity - php code does not).

Read more"; ?>

See creating custom DS fields using hooks for some good examples of other approaches.

Tags: