kentico_jurajo
-
10/21/2008 9:05:14 AM
RE:Portal Page Macro Evaluation Problem
Hi,
I am sorry, it seems that I was not clear enough.
Please see this document about common web part properties - http://www.kentico.com/docs/devguide/common_web_part_properties_and.htm.
You can specified the "Show for document types" which means that the web part (repeater in this case) is displayed only on documents of this type. "Content filter" property is usually set to document types you want to list in the repeater (e.g.: CMS.MenuItem;CMS.File) and in the transformation you need to select some transformation that was created for some document type (http://www.kentico.com/docs/devguide/writing_transformations.htm).
In the transformation macro <%# GetImage("FileAttachment")%> the "FileAttachment" is the code name of the field that was added to appropriate document type. So, in the transformation you can use IMG elements as usual and evaluate the file attachment (if the file is uploaded to existing document type) or from the CMS.File document type.
So, my suggestions were: 1) create a new document underneath each menu item, e.g. this documet will be CMS.File type. Then you will set the repeater to list only CMS.File types and get the file from the "FileAttachment" field in the transformation code. 2)In second example, you can add new field to the CMS.MenuItem document type where you will upload the image and you can use the macro as mentioned above (GetImage) or this one: <%# GetDocumentUrl("NodeGUIDColumn", "NodeAlias") %>
I hope it makes more sense now.
Best Regards, Juraj Ondrus
|