Quote:
Originally Posted by Dead Eddie
This'll display the preview image associated with the article.
Code:
<img src="{vb:raw article.previewimage}" width="{vb:raw article.imagewidth}" height="{vb:raw article.imageheight}" />
|
Eddie you are a legend.
Only problems i have now is that i've had to make it 100x60 as it was WAY too big for that box but now it looks odd as the images are all different sizes so don't end up square. How can i sort that so it uses the imagewidth and heigh as mentioned in the settings but at a 40% reduction or something so the thumbnails are the right aspect ratio?
Also here is my code:
Code:
<div class="cms_widget">
<div class="block">
<div class="cms_widget_header">
<h3>{vb:raw widget_title}</h3>
</div>
<div class="cms_widget_content widget_content">
<vb:each from="articles" key="contentid" value="article">
<div class="cms_widget_post_bit widget_post_bit">
<div class="cms_widget_post_comment widget_post_comment">
<h4 style="margin-left: -35px;" class="cms_widget_post_header widget_post_header"><a href="{vb:raw article.page_url}"> <img src="{vb:raw article.previewimage}" width="100px" height="60px" />{vb:raw article.title}</a></h4>
<vb:if condition="$article['tags']"></vb:if>
</div>
</div>
</vb:each>
</div>
</div>
How can i have it so i have two columns as there is a big white space on the right of the widget box.
Many thanks,
Andy