Custom Module Data Fields Not Appearing in Template "Co

Posted by Community Admin on 04-Aug-2018 20:56

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

All Replies

Posted by Community Admin on 20-Dec-2011 00:00

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

Posted by Community Admin on 20-Dec-2011 00:00

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

Posted by Community Admin on 20-Dec-2011 00:00

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?

Posted by Community Admin on 21-Dec-2011 00:00

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

Posted by Community Admin on 03-Oct-2013 00:00

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?

Posted by Community Admin on 08-Oct-2013 00:00

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

This thread is closed