How to access a custom attributes in a block
PermalinkAny help is appreciable.
Please help me to resolve this....
I did one called 'Page List Title' and one of the templates is a list view with thumbnails. You can take a look at the code to see how we did it or just use the block. here's what we used:
You have used a block to show a image. Can you tell me some more about this.
<?php $image = $page->getAttribute('your_attribute_handle'); if ($image) { //...do your image stuff here (generate a thumbnail, call ->getRelativePath(), etc.) //...and output the <img> tag here too } ?>
(This assumes you're inside the "foreach" loop in that view.php file.)