Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
templateIf... uploaded image

 

 


Toledoh
Enthusiast

Nov 27, 2006, 11:42 PM

Post #1 of 3 (453 views)
Shortcut
templateIf... uploaded image Can't Post

Hi All,

Maybe my brain has just collapsed - but I'm getting the error:


Quote
[$article.thumb requires a templateCell called 'article.thumb.row' in 'articleLists/our_beers.html']


You can see it at http://www.murraysbrewingco.com.au/artman2/publish/our_beers.shtml

I've added an upload field called "thumb" which is meant to be simply a thumbnail image - if wanted.

I've created the code as follows:

Quote
<!-- templateIf : $article.thumb$ ne "" -->
<td align="left" valign="top">$article.thumb$</td>
<!-- /templateIf -->


Can you tell me what I'm doing wrong?

Cheers!
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au


Donna
Staff / Moderator


Nov 28, 2006, 5:27 PM

Post #2 of 3 (444 views)
Shortcut
Re: [TF Solutions] templateIf... uploaded image [In reply to] Can't Post

Hi Tim!

Upload fields work sort of like the regular image fields. So, you'll need to create a field that tells Article Manager how to display that image. :)

For example, Article Manager has the file attachment built in, and includes this code:


Code
   <!-- templatecell : article.attachments.row --> 
[ <a href="$file.webUrl$">$file.title$</a> ]
<!-- /templatecell : article.attachments.row -->


So, you want the equivilent of this, but for your new uploaded image field. Something like this:


Code
   <!-- templatecell : article.thumb.row --> 
<img src="$file.thumbnailWebUrl$" border="1" width="$file.thumbnailWidth$" height="$file.thumbnailHeight$">
<!-- /templatecell : article.thumb.row -->


Otherwise, Article Manager has no idea exactly what you want to output. This let's you have complete control over the tag -- whether or not you want a border, if you want to add more code around it, change the alignment, and so on. All of the custom coding for the output would go into that templatecell.

Does that make sense? If not, let me know! :)

Donna

--
support@interactivetools.com


Toledoh
Enthusiast

Nov 28, 2006, 9:23 PM

Post #3 of 3 (438 views)
Shortcut
Re: [Donna] templateIf... uploaded image [In reply to] Can't Post

This stuff is pretty easy once you know how huh!

Thanks - worked a treat!

Cheers
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au