Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: Article Manager 2:
Caption text from images How to show it up?

 

 


Crankez
User

Feb 3, 2007, 5:01 PM

Post #1 of 7 (445 views)
Shortcut
Caption text from images How to show it up? Can't Post

Someone have idea how to show at web the little text from caption image uploads? I mean what code i need to use to show text.

Thanks for help


(This post was edited by Crankez on Feb 3, 2007, 7:17 PM)


ross
Staff / Moderator


Feb 4, 2007, 10:14 AM

Post #2 of 7 (425 views)
Shortcut
Re: [Crankez] Caption text from images How to show it up? [In reply to] Can't Post

Hi there

Thanks for posting!

The way you access the image caption for your images is by using the $file.caption$ placeholder.

Now, this placeholder is going to be available in two different places. First, on your /common/embeddedMedia.html template or anywhere that you have an embedded media templatecell.

What I mean by that last part is that if you stick a templatecell like this onto your categoryIndex.html or articlePage.html template:


Code
<!-- templateCell : pageDefault.embeddedMedia --> 

<!-- /templateCell : pageDefault.embeddedMedia -->


You'll be about to output the caption of your images like this:


Code
<!-- templateCell : pageDefault.embeddedMedia --> 
$file.caption$
<!-- /templateCell : pageDefault.embeddedMedia -->


Of course, going that way, you'll want to add some more code in there so that the image appears as well. Here's the what the whole thing would look like by default:


Code
<!-- templateCell : pageDefault.embeddedMedia --> 

<!-- templateIf : $file.caption$ ne '' -->
<table border=0 cellspacing=2 cellpadding=0 width=$file.width$ align=$file.align$>
<tr><td><img src="$file.webUrl$" height="$file.height$" width="$file.width$" border=1></td></tr>
<tr><td><span class="image_caption">$file.caption$</span></td></tr>
</table>
<!-- /templateIf -->

<!-- templateIf : $file.caption$ eq '' -->
<table border=0 cellspacing=2 cellpadding=0 width=$file.width$ align=$file.align$>
<tr><td><img src="$file.webUrl$" height="$file.height$" width="$file.width$" border=1></td></tr>
</table>
<!-- /templateIf -->

<!-- /templateCell : pageDefault.embeddedMedia -->


Just stick that whole block onto your article or category template and you'll be able to access the image caption.

Let me know what you think. Also, if you let me know what you are actually trying to do with the caption, I can go into more detail here for you Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.




Crankez
User

Feb 4, 2007, 11:28 AM

Post #3 of 7 (423 views)
Shortcut
Re: [ross] Caption text from images How to show it up? [In reply to] Can't Post

Thank you Ross for you answer!

What i try is just put the caption text at the bottom of the photo at articlePage.html but doenst work. The photo show up without problems, file caption no.

I use the templateCell code and doenst showup, but no errors with that code, without templateCell give me this error [unknown placeholder $file.caption$]

Here its the code i use at articlePage.html template:


Code
<table width="560" cellspacing="0" cellpadding="0" border="0"> 
<tr>
<td width="200" align="right" valign="top">
<img src="$article.image:fileAttribute(1,webUrl)$" width="200" border="0" alt="">
<br><br>

<!-- templateCell : pageDefault.embeddedMedia -->
$file.caption$
<!-- /templateCell : pageDefault.embeddedMedia -->
<br><br>
<span class="article_text"><a href="
mailto:?subject=$article.title:urlEncoded$&body=$published.articlePage.url:urlEncoded$">Email&nbsp;<img src="../../../images/mail.gif" width="16" height="12" border="0" alt=""></a>
<br><br>
<a href="$published.articlePrinterPage.url$">Print&nbsp;<img src="../../../images/printer.gif" width="14" height="14" border="0" alt=""></a></span>
<br>
</td>
<td width="25" valign="top"><img src="../../../images/separator.jpg" width="25" height="591" border="0" alt=""></td>
<td width="335" valign="top">
<span class="header_breadcrumb"><!--#include virtual="$published.categoryBreadcrumb.webpath$" --></span>
<br><br>
<span class="article_title">$article.title$</span><br>
<span class="autor_text">$article.author$</span>
<Br><br>
<span class="article_text">$article.summary$</span>
<br><br>
<span class="article_text">$article.content$</span>
<br><br>
<span class="copy_text">&copy; Copyright $article.date:format(yyyy)$ $article.author$</span>
<br><br>

</td>
</tr>
</table>



ross
Staff / Moderator


Feb 4, 2007, 12:38 PM

Post #4 of 7 (421 views)
Shortcut
Re: [Crankez] Caption text from images How to show it up? [In reply to] Can't Post

Hi again Smile.

That code is working for me ok so I am not quite sure what's going on here. Would you mind posting up a copy of your whole template so I can take a closer look at it?

I look forward to hearing from you Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.




Crankez
User

Feb 4, 2007, 12:46 PM

Post #5 of 7 (418 views)
Shortcut
Re: [ross] Caption text from images How to show it up? [In reply to] Can't Post

Sure, here you can find it

Thanks
Attachments: articlePage.html (3.70 KB)


Donna
Staff / Moderator


Feb 5, 2007, 4:36 PM

Post #6 of 7 (391 views)
Shortcut
Re: [Crankez] Caption text from images How to show it up? [In reply to] Can't Post

Hi Crankez,

I'm a little confused as to what you're going for here. By default, the caption is displayed along with the image via the embedded media template. What happens when you put the ***image1*** placeholder into one of your content fields?

Donna


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.


Crankez
User

Feb 6, 2007, 7:43 AM

Post #7 of 7 (385 views)
Shortcut
Re: [Donna] Caption text from images How to show it up? [In reply to] Can't Post

Hiya Donna!

When i put the ***image1*** inside to text works perfect, no problems. The problems are when i try to use that file.caption outside the text content. But its no a big problem, i can hadle that

Thank you

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4