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>
|