+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Custom Module Data Fields Not Appearing in Template "Common data" list

Custom Module Data Fields Not Appearing in Template "Common data" list

6 posts, 1 answered
  1. SVA Webmaster
    SVA Webmaster avatar
    85 posts
    Registered:
    18 Jul 2007
    20 Dec 2011
    Link to this post
    When attempting to edit a template for a custom content module type, the "Common Data" list on the top right corner of the Edit Template screen only lists the "UrlName" field, not all of the fields for the custom content type. (See screenshot)

    Additionally, if I have a "media" field defined as an image and want to pull that image into my display template, how do I reference it? For example, I have a custom module called "professionals" that I am using to create the directory of professionals page on our website. Within the professionals module, I have a field called "BioPhoto" that is set to a media/image field. Upon creating an item in this content type, I selected a photo already uploaded into a SF album. Now I want to edit a template for this content and pull in a field to display the BioPhoto. I have attempted to reference the BioPhoto field via <%# Eval("BioPhoto")%>, as have successfully with other varchar type fields such as "FirstName", but I receive an error (see screenshot 2). How can I use an image field in my template?

    Thanks
  2. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    20 Dec 2011
    Link to this post
    Hi Craig Brown,

    Yes, unfortunately this is a known issue. We will try to get this issue resolved as soon as possible.

    As, for your second problem, there are two things:

    a) you are getting the syntax error; in the alt tag you are missing the closing "%>" tag
    b) this however, won't help you a lot. What you need to do is actually following (as we do not store the url in the image field, but information about the image from the libraries module)

    <sitefinity:AssetsField id="bioPhoto1" runat="server" DataFieldName="BioPhoto" />

    make sure you include the Telerik.Sitefinity.Web.UI.Fields namespace (with tag prefix "sitefinity") for the above code to work.

    A bit of background on the AssetsField. It works with single document, multiple documents, single image, multiple images, single video and multiple videos. The control will autoconfigure itself based on the type of the field designated through the DataFieldName.

    Hope this helps.
     

    Regards,
    Ivan Osmak
    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 Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. SVA Webmaster
    SVA Webmaster avatar
    85 posts
    Registered:
    18 Jul 2007
    20 Dec 2011
    Link to this post
    Thanks for the help, Ivan! Will the datafield fix be released in a hotfix or do I have to wait until 4.5 in February?
  4. Hristo Borisov
    Hristo Borisov avatar
    190 posts
    Registered:
    18 Nov 2016
    21 Dec 2011
    Link to this post
    Hello Craig Brown,

    This will part of our upcoming release in February. By default the widget template includes all fields part of your module in a specific order depending on the field type, so the template should already possess all available fields. Please let us know if that doesn't work for you.

    Greetings,
    Hristo Borisov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  5. Maria
    Maria avatar
    2 posts
    Registered:
    07 Jul 2011
    03 Oct 2013 in reply to Hristo Borisov
    Link to this post
    I realize this is an older thread, but I'm having the same issue as the original poster of custom fields not appearing in the common data list in the current version  of Sitefinity (6.1.4600). Should this issue be resolved in this version and if so, can you direct me toward what might be causing it in a particular case?
  6. Kaloyan
    Kaloyan avatar
    272 posts
    Registered:
    02 Dec 2016
    08 Oct 2013
    Link to this post
    Hi Maria,

    If you share some details about your Dynamic module and the created fields I will try to reproduce the problem on my test project. At this time I have difficulties to reproduce it.

    Regards,
    Kaloyan
    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 Public Issue Tracking system and vote to affect the priority of the items
6 posts, 1 answered