image id??

Author Message

sim b

Tuesday 13 April 2004 6:25:01 am

Hy,
i know it is a stupid question, but i&acute;m a newby. I just want to get an image on one InfoPage. I tried <object id="154"/> but this is the id of the homepage. Where can i find the right id for my image, and is the code right?

thanks

John Mina

Tuesday 13 April 2004 7:27:22 am

Hey Sim
Sorry
but this is a wrong code i guess
first
where is that picture was it uploaded with an article or what ?
second
if you uploaded the picture ur self where did u add it, to which folder?

Hope i can help
JOhn

sim b

Tuesday 13 April 2004 10:07:12 am

well, i have got a "test.gif" and i would like to put it on one InfoPage. If you edit a InfoPage it is possible to upload an image (done that), the image is already shown in the admin mode, but i have to type in some code in the Textbox to see it in the web. The Image is in no folder (just on the InfoPage).How can i solve it?
isn&acute;t it possible to show only one image on the page, and nothing else (no text)???
thanks

John Mina

Wednesday 14 April 2004 1:02:34 am

Well igot your question now actually i was running into it 2 times before
so here you are
You can do that in 2 ways
First if the image is uploaded with an article or an infopage:-
1-Fetch the node that represents the infopage or article
2- type in the following code

{* Check to see if there is an actual image *}
{section show=$news.item.data_map.thumbnail.content.is_valid}
{* There is an image display it *}
{attribute_view_gui attribute=$news.item.data_map.thumbnail image_class=large}
{/section}
{*class = large /medium/small that is the size of the generated output*}

or also you can use

{section show=$node.data_map.thumbnail.content.is_valid}
<img src={$node.data_map.thumbnail.content.small.url|ezroot} />
{/section}

Second way can be used if you don't need an article, or info page there is an object named image to be used , and use the previos stpes therei gues sit should work

let me know if that helped
BEst regards
John

sim b

Wednesday 14 April 2004 5:13:12 am

Thanks a lot for your effort, but if i put this text into the content box, only this text is shown on the webview.
Have i to copy it in any template?
Why is it so complicated to publish an image? As i remember in an older version of ezpublish you could publish an image with html Tags.
bye

Alex Jones

Wednesday 14 April 2004 6:09:55 am

Sim, the code does need to be placed in your template. Adding an image is actually really easy, as all you have to do is click the browse button when entering a new Article, Infopage etc. The first bit of code that John provided will check to see if there is an image associated with the object, if so it will display it in the way laid out in your template, thus ensuring consistency for all of your articles. One note, you may need to change <i>thumbnail</i> to the attribute identifier associated with the image in that class. I believe the default name for this attribute in an Infopage is <i>image</i>.

If you want to add an image in the middle of your text you will need to use the Related Objects box to the right of the text input area. If the image already exists in the Media area you can click on the magnifying glass icon to locate the one you want. If the image is not on the site click on the <i>New</i> button and upload the image. When you have finished one of those steps copy and past the object tag that is in that box (it should look a lot like the one in your original post).

So, with all of that said, you mentioned that the <i>object id</i> is that of the home page. Had you followed one of the two steps I noted above? If so, did you check to make sure that you selected the radio button next to the image you wanted? It may be that the default radio button is the home page which could cause the confusion. It may be best to go through the process again to make sure the right object is selected.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

sim b

Wednesday 14 April 2004 12:58:58 pm

Man, i think i am going crazy. I&acute;ve done everthing you said (so far i understood it right), but my only result was a link to an other side, but no image.
In which template i&acute;ve to put the code?
If you got the nerv to tell me a last time what i shall do.. step by step... otherwise I&acute;ll try an other CMS.

thanks again

Alex Jones

Thursday 15 April 2004 8:32:26 am

I just noticed a typo on my part in my earlier posting. It should read <i>the code does <b>not</b> need to be placed in your template</i> I am really sorry about that. I'm not sure where else you can look for an object ID if the code provided in the <i>Related Objects</i> box on the right side of the page provides the wrong ID. Hopefully someone else can chime in and help out?

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:19:23
Script start
Timing: Jan 18 2025 19:19:23
Module start 'layout'
Timing: Jan 18 2025 19:19:23
Module start 'content'
Timing: Jan 18 2025 19:19:24
Module end 'content'
Timing: Jan 18 2025 19:19:24
Script end

Main resources:

Total runtime1.3251 sec
Peak memory usage4,096.0000 KB
Database Queries74

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 588.7813152.6094
Module start 'layout' 0.00630.0032 741.390639.3984
Module start 'content' 0.00941.3140 780.7891632.0547
Module end 'content' 1.32340.0017 1,412.843820.2031
Script end 1.3251  1,433.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2628160.0002
Check MTime0.00150.1160160.0001
Mysql Total
Database connection0.00150.112410.0015
Mysqli_queries1.253194.5647740.0169
Looping result0.00090.0686720.0000
Template Total1.283496.920.6417
Template load0.00220.164120.0011
Template processing1.281296.686120.6406
Template load and register function0.00010.009510.0001
states
state_id_array0.00170.126810.0017
state_identifier_array0.00280.208320.0014
Override
Cache load0.00190.1465550.0000
Sytem overhead
Fetch class attribute can translate value0.00130.097930.0004
Fetch class attribute name0.00120.092390.0001
XML
Image XML parsing0.00080.060330.0003
class_abstraction
Instantiating content class attribute0.00000.0015100.0000
General
dbfile0.00080.0590160.0000
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 34
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs