Lullabot

Distribuir contenido
Actualizado: hace 21 horas 31 mins

Module Monday: Pagepeeker

30 Enero, 2012 - 20:00

Whether you're building a Delicious-style link archive or a personal portfolio site, Drupal's Link Field is a great solution for storing user-entered URLs as part of a node. If you want to display something more visual than a URL, however, things get tricky. Third-party thumbnail generation services can create screenshots of URLs, but most rely on clunky client-side scripts to layer the thumbnails on top of your design. The Pagepeeker module offers a slick alternative: it leverages an up-and-coming thumbnail service to generate site screenshots without any Javascript code.

Setting up the module is simple: create a Link field, then select the PagePeeker display formatter. You can choose from several thumbnail sizes, or pull in the 16x16 Favicon for the linked URL. If you're working with links that aren't stored in FieldAPI fields, the module also provides a helpful theme function. Just toss a URL at it, specify the size of thumbnail you want, and it will output a linked image tag.

Categorías: Drupal