Thumbnails not showing up

Permalink Browser Info Environment
Hi,

I want a pagelist with thumbnails. But when i apply the blog_index_thumbnail template i can see no thumbnails. How do i make the thumbnails show up? The pages have a custom attribute called 'thumbnail'.

I attached a screenshot, this is what i want to achieve.

1 Attachment

Type: Pre-Sale
Status: In Progress
grafoman
View Replies:
SkyBlueSofa replied on at Permalink Reply
SkyBlueSofa
The 'blog_index_thumbnails' is a direct port of the core 'page list' template by the same name. It seems to get an image from an area on the page called 'Thumbnail Image'.

What you are looking to do is use a page attribute. The steps I would use for that are:
1. Copy the 'blog_index_thumbnails' file to the {root}/blocks/page_list_plus/templates directory.
2. Update the code from lines 25-32 that looks like:
$ts = $cobj->getBlocks('Thumbnail Image');
if (is_object($ts[0])) {
   $tsb = $ts[0]->getInstance();
   $thumb = $tsb->getFileObject();
   if ($thumb) {
      $imgHelper->outputThumbnail($thumb, 220, 220, $title);
   }
}
and replace it with this code:
global $c;
$imgHelper->outputThumbnail($c->getAttribute('thumbnail'), 220, 220, $title);


This is untested code, but came from this page on the forum:http://www.concrete5.org/community/forums/customizing_c5/displaying...

Hope this helps.
--Dave

concrete5 Environment Information

# concrete5 Version
5.6.3.2

# concrete5 Packages
Advanced Page List (1.0.3), Auto-Nav Pro (1.5.5), Deluxe Image Gallery (1.6.6), Designer Content (3.1.1), FlexSlider (2.2.0.5), Page List+ (5.6.0.0.0.5.6.2), Picmonkey Image Editor (1.00).

# concrete5 Overrides
blocks/agenda_item, blocks/blokindekijker, blocks/expandable_content, elements/files, languages/ar, languages/cs_CZ, languages/da_DK, languages/de_DE, languages/el_GR, languages/es_AR, languages/es_ES, languages/es_MX, languages/es_PE, languages/fa_IR, languages/fi_FI, languages/fr_FR, languages/it_IT, languages/ja_JP, languages/nb_NO, languages/nl_NL, languages/pt_PT, languages/ro_RO, languages/ru_RU, languages/sk_SK, languages/sl_SI, languages/sv_SE, languages/tr_TR, languages/vi_VN, languages/zh_TW, themes/RANDEEVOE

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off

# Server Software
Apache/2.4.10 (Unix) OpenSSL/1.0.1i PHP/5.5.15 mod_perl/2.0.8-dev Perl/v5.16.3

# Server API
apache2handler

# PHP Version
5.5.15

# PHP Extensions
apache2handler, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, json, ldap, libxml, mbstring, mcrypt, mhash, mssql, mysql, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, Phar, posix, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sybase_ct, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, zlib.

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 128M
sql.safe_mode - Off
upload_max_filesize - 128M
ldap.max_links - Unlimited
mssql.max_links - Unlimited
mssql.max_persistent - Unlimited
mssql.max_procs - Unlimited
mssql.textlimit - Server default
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
sybct.max_links - Unlimited
sybct.max_persistent - Unlimited

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.