Forums / Setup & design / image id??

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>

eZ debug

Timing: Jan 18 2025 16:11:45
Script start
Timing: Jan 18 2025 16:11:45
Module start 'content'
Timing: Jan 18 2025 16:11:45
Module end 'content'
Timing: Jan 18 2025 16:11:45
Script end

Main resources:

Total runtime0.1319 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 587.5391180.8516
Module start 'content' 0.00480.0053 768.3906101.9375
Module end 'content' 0.01010.1217 870.3281529.9609
Script end 0.1318  1,400.2891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00342.5429200.0002
Check MTime0.00131.0080200.0001
Mysql Total
Database connection0.00050.413910.0005
Mysqli_queries0.090968.92031410.0006
Looping result0.00120.94091390.0000
Template Total0.121492.010.1214
Template load0.00080.614910.0008
Template processing0.120591.373410.1205
Override
Cache load0.00060.455610.0006
Sytem overhead
Fetch class attribute can translate value0.00080.580010.0008
XML
Image XML parsing0.00020.175110.0002
General
dbfile0.00302.2765200.0002
String conversion0.00000.003630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs