Conditional Read More...

Rating

If you create a view in which you use a shortened text (or summary), then you want the visitor with the Read More ... link, can read the full text.

Problem: the Read More ... link appears alwaysEven where the shortened text is also the full text. This is disturbing as on click, the same text appears identical. Completely redundant.

We can solve this problem. The following print shows Read More ... but it does not appear in the second row. All text has been shown

Screen001618.png

First you create the view with the following fields.

Title

Body: is shortened

Screen001611.png

Body: full size, but hidden. This field will serve to determine how big the body field is.

Screen001612.png

Link: the Learn More link, hidden because we are going to show it or not in a conditional field

Screen001613.png

Conditional field: you need to install the module for that. Here we examine if the field full size is greater than our abbreviated version. If so, we then show Read More .. if not, we show nothing.

Screen001614.png

Make sure you choose the right body field (the full value )

Screen001615.png

You get now the following view.

Screen001610.png