• Archived  

By terryally - May 26, 2009

I created in db_article a new image upload field named index203. This is to be used only on a customised home page to display the lead story.

In the template I inserted it as:

<img src="$_uploadurl$1/$article.index203$" height="152" width="203" class="index203">[/#ff0000][/#000000]

but I got the error message:


[$article.index203 requires a templateCell called 'article.index203.row' in 'articleLists/frontpagelead.html']

So I inserted the row as follows:

<!-- template insert : $articleList$ -->
<!-- templatecell : articleRow -->

<!-- templatecell : article.index203.Row -->
<img src="$_uploadurl$1/$article.index203$" height="152" width="203" class="index203">
<!-- /templatecell : article.index203.Row -->[/#ff0000]

<a href="$published.articlePage.url$" title="$article.title$" class="artname_lead_title">$article.title$</a><br /><br />
<div class="arttext_lead_summary">$article.summary$</div>

<!-- templateIf : $article.attachments$ ne "" -->
<div class="summary_attachments"> <b style="color: #666666;">Download attachment(s):</b> $article.attachments$
<!-- templatecell : article.attachments.row -->
[ <a href="$file.webUrl$">$file.title$</a> ]<br><br clear="all">
<!-- /templatecell : article.attachments.row -->
</div>
<!-- /templateIf -->

<!-- templateIf : $article.externalLink$ ne "" -->
[ <a href="$article.externalLink$">Visit&nbsp;Website</a> ]<br><br clear="all">
<!-- /templateIf -->

<!-- /templatecell : articleRow -->


The end result is that the image (which is set as a mandatory field) does not display. I even tried a templateif statement:

<!-- templateif : $article.index203$ -->
<img src="$_uploadurl$1/$article.index203$" height="152" width="203" class="index203">
<!-- /templateif -->
[/#ff0000]



But still nothing doing.

Can you please tell me how to make this image display?

Re: [terryally] Can't get my image to appear

  • Archived  

By Donna - May 27, 2009

Hi Terry,

Try something like this:

First, put your Row templatecell anywhere on the page, doesn't really matter -- it's not where your image will eventually show up. It should look like this:

<!-- templatecell : article.index203.Row -->
<img src="$file.thumbnailWebUrl$" height="152" width="203" class="index203">
<!-- /templatecell : article.index203.Row -->

(You can change that to src="$file.webUrl$" if you don't want to use the thumbnail.)

Then, where you want the image to appear, just add this:

$article.index203$

The templatecell defines what code should show up wherever you place the placeholder.

I hope this helps. :)
Donna

--
support@interactivetools.com

Re: [terryally] Can't get my image to appear

  • Archived  

By Donna - June 1, 2009

Hi Terry,

Hmm, I'd have to take a look at your database options to see what the correct placeholder should be -- if you want, drop me an email and I can pop in and see what the right placeholder should be. :)

When it IS working, you won't want the "$_uploadurl$1" part -- only the "$file.thumbnailWebUrl$" is necessary, within the templatecell. The bit you've got will never parse correctly, that's not how the placeholder will work. However, if it's giving you an error on the placeholder itself, there's something else going on there that I can't quite see.
Donna

--
support@interactivetools.com

Re: [Donna] Can't get my image to appear

  • Archived  

By Website-Design - July 1, 2009

Hi Terry,

Try something like this:

First, put your Row templatecell anywhere on the page, doesn't really matter -- it's not where your image will eventually show up. It should look like this:

<!-- templatecell : article.index203.Row -->
<img src="$file.thumbnailWebUrl$" height="152" width="203" class="index203">
<!-- /templatecell : article.index203.Row -->

(You can change that to src="$file.webUrl$" if you don't want to use the thumbnail.)

Then, where you want the image to appear, just add this:

$article.index203$

The templatecell defines what code should show up wherever you place the placeholder.

I hope this helps. :)


Thanks
YourLocalSite® is a local website design company for small to medium businesses. We design and host websites for a small monthly fee and offer services above and beyond our competition and for a fraction of the costs.