Add image of related content type in widget template - General Discussions - General Discussions - Progress Community
 General Discussions

Add image of related content type in widget template

  • Add image of related content type in widget template
  • I have the following scenario. I have a module builder content type called "Show Floor". There are "Exhibitors" and "Booths" as subtypes. An Exhibitor is related to a booth.

    In the template for the single Booth, I'd like to include the Exhibitor information. For most part, I can add "<%# Eval("Exhibitor.About")%>"  Exhibitor.Field..

     How do I access an image? I have a field named Logo.

  • Hello Amanda,

    As far as I understand, you have a RelatedData field in one of the module subtypes, which you use to store an image/images and the parent type relates to this subtype. You want to show the subtype Image field into the parent type template. If this is right, you should go to the parent item template from Design -> Widget Templates and choose the template you want to modify. Then, from the right Sidebar, select your field that you use for the RelatedData for your subtype. In the item template of the generated snippet, you should insert the snippet for your RelatedImage field of your subtype. Go to the Widget Template of your subtype module and from the right sidebar select the RelatedImage field and copy the generated code. Insert it in the above mentioned place and now you should be able to see the image from the subtype.

    Regards,
    Nikola Zagorchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items