1

In Views, in order to group certain fields inside a common div, i excluded them from display and inserted them in a global text field by using their 'replacement pattern references'.

Here's what the div looks like :

<div class="nodetitle">[title]</div>
<div class="date-author"><span>[name]</span> - <span>[created]</span></div>
<div class="readmore"><a href="[path]">More details &raquo;</a></div>

The thing is i wanted to trim the node title to 50 characters max. Trimming works fine when displaying the field 'as is' but not when it's been used as a replacement pattern in a different field.

Any help on how to achieve this ?

Thanks

3

I've double checked your problem and it seems to works like a charm.

  1. In your view go to Field -> Title -> [edit] -> Rewrite results -> Trim this field to a maximum length -> set maximum length to 50 enter image description here
  2. Add Global: Custom text field and place [title] in text field. enter image description here

Result should looks like this: enter image description here

1
  • I'm so ashamed of myself, i was trimming the wrong field, that's why it had no effect. Thank you ;) – FlashSP Jan 27 '15 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.