$alt tags not working?

Permalink Browser Info Environment
Hi I always get into a bit of a pickle when trying to use the code,
This time I'm just trying to get the ALT tag text to display but i just can not get it to show up.

here is my code bellow.

<img src="<?php $img = $item->PLimg->getImageObj(800,497, true);
if ($img) {
echo $img->src;
}?>" alt="<?php $alt = $item->PLimg->getAltText();?>" title="<?php $alt = $item->PLimg->getAltText();?>" width="100%">

please can you advise.

Type: Discussion
Status: In Progress
ecomatt
View Replies:
theblockery replied on at Permalink Reply
theblockery
Sorry you're having trouble with this.

Your code looks correct to me. Does this field have the user-editable alt
text field when editing the block? Or are you wanting to pull the alt text
from the file properties? If there is no user-editable alt text, or if it
is left blank, then it will pull from the file's description attribute or
title attribute (which might be empty, although that would be unusual
because C5 populates the title attribute by default when the file is first
uploaded).

If none of that is the case, would it be possible for me to access your
site so I can take a closer look at what's going on? (You could send login
details to me directly at jordan@theblockery.com ). Or if you'd rather not
provide that info, perhaps we could schedule a google hangout or skype
session where you could screenshare your site for me?

-Jordan

concrete5 Environment Information

# concrete5 Version
5.6.3.4

# concrete5 Packages
Designer Content Pro (1.2.3), Designer Content Pro - Custom Block Storage (1.0), Designer Gallery (1.0), Page Redirect (1.0), Page Selector Attribute (1.0).

# concrete5 Overrides
blocks/dcp_layout, blocks/dcp_video, blocks/old, blocks/autonav, blocks/dcp_proects_filter, blocks/dcp_projects, languages/fi_FI, languages/es_MX, languages/ar, languages/zh_TW, languages/vi_VN, languages/sv_SE, languages/ru_RU, languages/sk_SK, languages/it_IT, languages/nb_NO, languages/fr_FR, languages/de_DE, languages/pt_BR, languages/nl_NL, languages/es_AR, languages/cs_CZ, languages/fa_IR, languages/ro_RO, languages/el_GR, languages/sl_SI, languages/ja_JP, languages/es_PE, languages/pl_PL, languages/tr_TR, languages/pt_PT, languages/es_ES, languages/da_DK, themes/mhworkshop

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

# Server Software
LiteSpeed

# Server API
litespeed

# PHP Version
5.5.30

# PHP Extensions
bcmath, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, intl, ionCube Loader, json, libxml, litespeed, mbstring, mcrypt, memcache, mhash, mysql, mysqli, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, readline, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib.

# PHP Settings
max_execution_time - 300
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - -1
max_input_vars - 10000
memory_limit - 256M
post_max_size - 128M
sql.safe_mode - Off
upload_max_filesize - 128M
memcache.max_failover_attempts - 20
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 2000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5
zend_optimizerplus.max_accelerated_files - 2000
zend_optimizerplus.max_file_size - 0
zend_optimizerplus.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11) AppleWebKit/601.1.56 (KHTML, like Gecko) Version/9.0 Safari/601.1.56

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.