Webmastersite.net

Search    Register    Log In   

Details

Easier Image References
By
Dec 10, 2015 pm31 1:44 PM

One of today's changes for the upcoming WSN 9.2.37 is a set of new template variables that provide easier ways to reference files attached to an image in a specific order (the sort order set on upload/edit). There's now {LINKTHUMBIMAGEX[number]}, {LINKTHUMBURLX[number]}, and the associated boolean {LINKHASFILEX[number]}. You can pair these with the preexisting {LINKCAPTION[number]} and {LINKHASCAPTION[number]}. If you want to show the third image on a listing, and include the caption only if it's present, here's all you have to do now:
<IF {LINKHASFILEX[3]}>
{LINKTHUMBIMAGEX[3]}
<IF {LINKHASCAPTION[3]}><br>Caption: {LINKCAPTION[3]}</IF>
</IF>

To change the thumbnail size away from the default, add width and height parameters... 500 width by 400 height for example:
<IF {LINKHASFILEX[3]}>
{LINKTHUMBIMAGEX[3 <,> 500 <,> 400]}
<IF {LINKHASCAPTION[3]}><br>Caption: {LINKCAPTION[3]}</IF>
</IF>

This can be very useful if you want to position large thumbnails in different places on the details page, with information around them.




Tags ,
Views 246 views. Averaging 246 views per day.
Similar Listings
Hybrid Field References

Sorry, you don't have permission to post. Log in, or register if you haven't yet.

Please login or register.