Upload and display

1
I'v got a div in my html <div class="MxClient_logoPane"></div> with css styling .MxClient_logoPane { position: absolute; left: 20px; width: 180px; height: 60px; top: 12px; } I can upload an image and display it, but only in the image upload form. I need to upload an image and display it in the logopane, how do I display the image that I uploaded in the logopane?
asked
2 answers
4

The top pane is (not yet) configurable in the modeler. So to show an image in the top pane, you normally would put it directly in the index page, or define it as a background-image in css of your theme (like Jelle demonstrated).

However, if you want to put a dynamic image in the top pane, you should use the fileID (attribute of System.FileDocument) of the image you want to show. Once you have the fileID, you can refer to the image as follows (replace [id] with the fileID):

http://servername/file?fileID=[id]

This will always show the image which is uploaded for that particular MendixObject. If the image you want to show is not always the same MendixObject, but rather depends on logic, then a custom widget should be used. The easiest solution would be a custom widget that calls a microflow, which returns the MendixObject for which to show the image.

answered
0

In your CSS class, add the following:

background: transparent url(images/layout/yourImage.jpg) no-repeat;

This will display the image once.

Also, the location of that image is in the folder "yourProject/theme/images/layout", as you can see in the url.

answered