1

I have a views block which display user's detail like name, picture and about. i want to give a read more link in "about" field, by click "read more" link the trimmed "about" will open in the same block.

"About" is a field from view, so in this field text will trim after 200 words if the about field is more then 200 words then after trimmed part there will be a read more link and after clicking this link the whole text will visible on the same position just increase the height of the block.

Thanks

  • where do you want to redirect the user by clicking this button ? – M a m a D Apr 6 '14 at 17:48
1

jQuery expander module will work for you.

You will have to select expander from formater options in views field configuration.

| improve this answer | |
  • i have install this module and include the library in to libraries/expander folder, and set the formater as expander but its not working. – asalug Apr 6 '14 at 19:00
  • show error (function ($) { /** * jQuery expander. */ Drupal.behaviors.jqueryExpander = { attach: function (context) { var expander = Drupal.settings.jqueryExpander; // Add the jQuery expander. for (var key in expander) { $('.field-expander-' + key).expander(expander[key]);//error in this line uncaught } } }; })(jQuery); – asalug Apr 6 '14 at 19:08
  • I have tested this module before posting it here. See if this is working from manage display for any field – Fahad Ur Rehman Apr 7 '14 at 8:07
  • you may also post this error in drupal.org issue que for this module – Fahad Ur Rehman Apr 7 '14 at 8:07

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.