Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 1:
Link image in the summary to the article page.

 

 


cno
Novice

Jul 17, 2006, 12:31 AM

Post #1 of 8 (1828 views)
Shortcut
Link image in the summary to the article page. Can't Post

Is it possible to add a link to ***image1*** in the summary that points to the article page? I tried changing to this in the template:


Code
 <!-- templatecell : img_caption --><a href="$detail_link$"><img src="$img_url$" height="$img_height$" width="$img_width$" border=1></a> 



but it seems like $detail_link$ doesn't work there.


Donna
Staff / Moderator


Jul 17, 2006, 10:04 AM

Post #2 of 8 (1821 views)
Shortcut
Re: [cno] Link image in the summary to the article page. [In reply to] Can't Post

Hi there :)

Thanks for your post!

The best way to set this up is to use a specific field for the summary image. So, you'd use one of the spare fields as "Summary Image". Then, setup the template like this:

(In your row templatecell)

<a href="$detail_link$"><img src="$art_fieldX$" alt="link to full article"></a>

Then, in the article editor, enter the following into the new field:

***imageX:url***

This tells Article Manager to output the URL of the image directly, so you can use it in as the source of an image.

Let me know if this works for you. :)

Donna

--
support@interactivetools.com


cno
Novice

Jul 17, 2006, 10:18 AM

Post #3 of 8 (1819 views)
Shortcut
Re: [Donna] Link image in the summary to the article page. [In reply to] Can't Post

Thanks Donna for the quick reply, I will try this and see how it goes.


cno
Novice

Jul 17, 2006, 10:37 AM

Post #4 of 8 (1816 views)
Shortcut
Re: [cno] Link image in the summary to the article page. [In reply to] Can't Post

I got it to work, however this leaves me with two more problems... The caption text will not be displayed below the picture and I MUST have an image to each article, else I'm just displaying a red x where the image is supposed to be.

I think the caption text is pretty easy to solve with a new field. But the "no image" problem is worse, or do you have a smart solution?


ross
Staff / Moderator


Jul 17, 2006, 10:50 AM

Post #5 of 8 (1814 views)
Shortcut
Re: [cno] Link image in the summary to the article page. [In reply to] Can't Post

Hi.

Glad to hear that got you going!

The caption will definitely work well with a sparefield so give it a shot and let me know how you make out.

With the articles that have no images, I would add in a new attribute to your image tag on the templates. Basically, it would look like this:

<a href="$detail_link$"><img src="$art_fieldX$" alt="link to full article" onerror=”/path/to/image.gif”></a>

What this does is tell the image tag to load a default image if the SRC in the tag leads to a broken image.

What I usually do is upload a small image that is basically just a blank pixel or something similar and use that so instead of a broken image, you end up with nothing.

Article Manager has a great image you can use: /artman/images/spacer.gif.

Does that make sense? Have a go at it and let me know how you make out 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: http://www.interactivetools.com/consulting/



cno
Novice

Jul 17, 2006, 11:47 AM

Post #6 of 8 (1810 views)
Shortcut
Re: [ross] Link image in the summary to the article page. [In reply to] Can't Post

Thanks for the suggestion, that will work. Just one small problem... I must have the image border set to 0 to not have a border around the pixel image and that makes my design look a little bit funny :)


(This post was edited by cno on Jul 17, 2006, 11:48 AM)


ChetW
Staff


Jul 18, 2006, 1:38 PM

Post #7 of 8 (1794 views)
Shortcut
Re: [cno] Link image in the summary to the article page. [In reply to] Can't Post

Hi,

Thanks for the follow-up,

One thing that you could do is set the image border color to match the background color.

To do this you could create an inline style with the border color properties. For example:


Code
<a href="$detail_link$"><img src="$art_fieldX$" alt="link to full article" onerror=”/path/to/image.gif”></a>


Could be changed to:


Code
<a href="$detail_link$"><img src="$art_fieldX$" alt="link to full article" onerror=”/path/to/image.gif” style="border:#your_background_color;"></a>


Inside the "your_background_color" place the hexidecimal color that you need.

Does this help you? Give it a try and let me know how it works for you!
Cheers,
Chet Woodside - Product Specialist
support@interactivetools.com

[hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url]
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 [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]


cno
Novice

Jul 20, 2006, 11:17 AM

Post #8 of 8 (1755 views)
Shortcut
Re: [ChetW] Link image in the summary to the article page. [In reply to] Can't Post

Thanks, I've got it to work pretty much the way I wanted it to now. I skipped the border and made some changes to the layout instead, worked out even better. The onerror code didn't work for me though, but I made some research and came up with this code which worked better:


Code
 onerror="this.onerror=null;this.src='$_imageurl$set1_maple/spacer.gif';"

Thanks again for your help, now I'm happy with both the layout and the functionality.