Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
Can't get my image to appear

 

 


terryally
User

May 26, 2009, 5:13 AM

Post #1 of 5 (2295 views)
Shortcut
Can't get my image to appear Can't Post

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:


Code
<img src="$_uploadurl$1/$article.index203$" height="152" width="203" class="index203">



but I got the error message:



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



So I inserted the row as follows:


Code
 <!-- 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 -->


<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:


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





But still nothing doing.

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


Donna
Staff / Moderator


May 27, 2009, 5:35 PM

Post #2 of 5 (2261 views)
Shortcut
Re: [terryally] Can't get my image to appear [In reply to] Can't Post

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


terryally
User

May 28, 2009, 12:31 AM

Post #3 of 5 (2231 views)
Shortcut
Re: [Donna] Can't get my image to appear [In reply to] Can't Post

Hi Donna,

Thanks so much for your response and for explaining the templatecell principle to me.

I tried your solution and it didn't work. Maybe Artman does not like the term "index203" so I tried "image203" but the same dud result. The error response was:

[unknown placeholder $article.image203$]

So I added yet another field called image203filename in which I put the filename of image203 which I upload under "image203" and then inserted it:

<img src="$_uploadurl$1/$article.image203filename$" height="152" width="203" class="image203">

Even though this worked, any ideas as to why Artman is not parsing the $article.index203$ ?

Terry


Donna
Staff / Moderator


Jun 1, 2009, 4:51 PM

Post #4 of 5 (2169 views)
Shortcut
Re: [terryally] Can't get my image to appear [In reply to] Can't Post

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


Website-Design
New User

Jul 1, 2009, 8:06 PM

Post #5 of 5 (1908 views)
Shortcut
Re: [Donna] Can't get my image to appear [In reply to] Can't Post


In Reply To
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 [url "http://yourlocalsite.com"] local website design[/url] 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.