
Donna
Staff
/ Moderator

Mar 4, 2009, 1:32 PM
Post #9 of 9
(4285 views)
Shortcut
|
|
Re: [pilotchris84] Template cell 'user_noimage' is not defined!
[In reply to]
|
Can't Post
|
|
Hi Chris, Hmm, didn't see anything that obviously popped out at me and said "Ah, this is the cause!" but I do see a couple of things that might be. You've got this as your "no image" templatecell right now:
</div> <p align="center"> <div align="center"> <table border=0 cellspacing=0 cellpadding=2 width=590> <tr> <td valign=top align=center width=115> <table border=1 cellspacing=0 cellpadding=0 width=100 height=100> <tr> <td bgcolor="#EEEEEE" align=center><font face="tahoma,arial" size=3><b>Photo<br>Not<br>Available</b></font></td> </tr> </table> </td> It's quite a bit different from your "image" templatecell, as it starts with a closing div (that has no corresponding open div, ends with a </td> tag... whereas your "image" templatecell is a nicely formatted single table. The two should be virtually identical, except one will have the code for an image, and the other will have some filler that says "no image". Basically what a templatecell is is a bit of code that is repeated if the conditions of that templatecell are met. So, imagine that the code in that templatecell is going to be repeated each time you add a user, and it'll pick which one to use based on if there's an image or not. Add 6 agents with no images, and it'll duplicate your "no image" code 6 times. Have 3 with images and 3 without, and for each one with an image, it'll duplicate the "image" code, and for each one without an image, it'll use the "no image" code. This means that the code needs to be reasonably "independent", since you don't know what order it's going to be in. You can't have the "image" code depend on the "no image" code, since it might not appear -- and vice versa. And save for being in a "container" on your page, you don't really want it to depend on the external code either, as adding multiple agents will make things go a bit wonky. (Or in your case, it fixes the wonky.) Does that make sense? I hope that helps -- try comparing again to the default templatecells, that might help make a bit more sense. :) Donna -- support@interactivetools.com
|