Forums / Setup & design / images not shown
Toni Ascó
Sunday 11 April 2004 1:55:00 am
Hi, i'm using the online editor to edit my articles.When i try to insert an image (using the magnifying glass and such) the online editor inserts a piece of code like:
<object id=a_number size=msmall>
But when the article is displayed i only see a link where i should see an image.
Any idea?
Thanx in advance,Toni
Lazaro Ferreira
Monday 12 April 2004 9:44:40 am
Hi,
It seems that you are getting the result of the default image template, that shows a link to the image object, instead you should get the embed image template (you will need to verride this) that shows the image within your i.e article, or info_page.etc
Lazaro http://www.mzbusiness.com
Monday 12 April 2004 10:00:14 am
Thanx Lazaro, it workerd! :)Now i face another problem, how can i get the image_size and the alignment?
At the momment i have them as a default mode (medium and center) but if i set small and left in the online editro i expect to put those values in the template override.I see that embed.tpl gets the attributes in the very first line, but i don't know how to acces to those attributes from Exponential code...
Thanx in advance,
Toni
Wednesday 14 April 2004 11:07:11 am
This is the image_embed.tpl supplied with EZP Portal Setup
{let image_variation="false" align="center" href=''} {section show=is_set($attribute_parameters.size)} {set image_variation=$object.data_map.image.content[$attribute_parameters.size]} {section-else} {set image_variation=$object.data_map.image.content["medium"]} {/section} {section show=is_set($attribute_parameters.align)} {set align=$attribute_parameters.align} {section-else} {set align="center"} {/section} {section show=is_set($attribute_parameters.href)} {set href=$attribute_parameters.href} {section-else} {set href=""} {/section} {switch match=$align} {case match="left"} <div class="imageleft"> {section show=$href}<a href={$href|ezurl}>{/section} <img src={$image_variation.full_path|ezroot} /> {section show=$href}</a>{/section} <div style="width: {$image_variation.width}px;"> {$object.data_map.caption.content.output.output_text} </div> </div> {/case} {case match="right"} <div class="imageright"> {section show=$href}<a href={$href|ezurl}>{/section} <img src={$image_variation.full_path|ezroot} /> {section show=$href}</a>{/section} <div style="width: {$image_variation.width}px;"> {$object.data_map.caption.content.output.output_text} </div> </div> {/case} {case} <div class="imagecenter"> {section show=$href}<a href={$href|ezurl}>{/section} <img src={$image_variation.full_path|ezroot} /> {section show=$href}</a>{/section} <div style="width: {$image_variation.width}px;"> {$object.data_map.caption.content.output.output_text} </div> </div> {/case} {/switch} {/let}
Look at the section :
{section show=is_set($attribute_parameters.size)} {set image_variation=$object.data_map.image.content[$attribute_parameters.size]} {section-else} {set image_variation=$object.data_map.image.content["medium"]} {/section}
As you see, you can change "medium" size for another one there, it should works
-----------Lazaro
bob barker
Sunday 18 April 2004 5:07:50 pm
I have followed this and other threads on the same subject, but I simply do not understand the solution. Could someone step me through how exactly to embed an image in a news article and actually have it displayed? I use the on-line editor, I insert an image object and it shows up in the article in admin mode. In user mode it shows as a text link to the image file. How, exactly, do I override the default template to use some other template, and what does the other template look like?
Please help - this is incredibly frustrating - embedding an image into text should not be this difficult!
Bruce Morrison
Sunday 18 April 2004 7:45:56 pm
1. Copy design/admin/override/templates/embed_image.tpl to design/<<your design>>/override/templates/embed_image.tpl2. Add
[embed_image] Source=content/view/embed.tpl MatchFile=embed_image.tpl Subdir=templates Match[class]=5
to settings/siteaccess/<<your siteaccess>>/override.ini.append3. Clear cache
CheersBruce
My Blog: http://www.stuffandcontent.com/ Follow me on twitter: http://twitter.com/brucemorrison Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish
Monday 19 April 2004 6:12:19 am
Bruce, thank you, however ....
I Have done exactly as indicated. But the images still show up as text links to the image.Yes, I did clear the caches and yes, they are valid image files. If you would like access to the site, send me a clear email address and I will send you the id and password.
Bob Barkerbob.barker@newxco.com
Monday 19 April 2004 6:55:39 am
After much checking/rechecking and so on, it now works and I am convinced that something is odd with cache clearing. I used the clear all cache link in the admin screens but images still do not appear, however, if I clear each cache individually then lo and behold .... images in the articles.
Probably this is all just a figment of my imagination, but are you sure that the clear all cache button works??
Thanks for your help - I was on the right track, but cache clearance was masking the reolution.
Felix Laate
Tuesday 04 May 2004 1:56:46 pm
I have experienced the same thing many times with the 3.2-x and 3.3-x series. Never trust the "clear all" option! Do it manually!
Is this a bug?
Felix
Publlic Relations Manager Greater Stavanger www.greaterstavanger.com