Hi All,
We have created custom widget that content a list with specific filed like Image, Title and Description. We need one more filed in exiting widget how we add new field?
Widget "fields" are placed in the Controller for that custom widget and are public properties, so you would add a new field their and then implement it into the custom Designer view. Here is the documentation to developing a custom MVC widget. www.progress.com/.../develop-widgets-mvc
[mention:618aa021aa0d4f59b0baea5ca3e34d66:e9ed411860ed4f2ba0265705b8793d05] Thanks for your replay.
Current this file "List.SimpleList.cshtml" content Old UI Filed, I want one more filed in exiting file.
How to know which controller is belong this .cshtml file?
Note: List.SimpleList.cshtml file is created hard file now I want to used in site with new added filed so I can select image whatever I want.
If you want to add an image field to an existing content type like lists(news,blogs,posts, etc.) you can follow the attached video:
screencast-o-matic.com/.../cqhobITVI3
Docs:
[mention:618aa021aa0d4f59b0baea5ca3e34d66:e9ed411860ed4f2ba0265705b8793d05]
I have tried as you mentioned step but didn't update, Can you please tell me how we can used two image filed in one list like one image for "Heading" and one for "Title".
I have created custom filed like "Image2" and write this @item.Fields.Image2.Fields.MediaUrl but didn't work.
Simple. I want two image fields in list how can I achieved
Most likely your widget template was cached, try clear your browser cache or rebuilding the solution to precompile the view or turn of view precompilation. www.progress.com/.../optimize-development
Hi [mention:618aa021aa0d4f59b0baea5ca3e34d66:e9ed411860ed4f2ba0265705b8793d05]
I am getting this error "Exception occured while executing the controller. Check error logs for details."
As per your suggestion this is right syntax @item.Fields.Image2.Fields.MediaUrl or else ?
if you set the image to allow for more than one image selection the above code would not work and you would need to iterate over the field value of Image2.
@foreach(var img in item.Fields.Image2){ <img src="@img.Fields.MediaUrl" /> }
Hi [mention:618aa021aa0d4f59b0baea5ca3e34d66:e9ed411860ed4f2ba0265705b8793d05] ,
I have tried below code but still not working.
I have list so image will come through loop through like below my code.
I have two separate filed like "image" and "image2" user can upload only one image at a time not more then one.
<div class="@Model.CssClass">
@foreach (var item in Model.Items){
<div>
<div>
<img src="@item.Fields.Image" />
</div>
<div>
@foreach (var img in item.Fields.Image2)
{
<img src="@img.Fields.MediaUrl" />
}
</div>
</div>
}
</div>
Error: Exception occured while executing the controller. Check error logs for details.
Can you please review the error log and see what the issue(s) is? You can attach it here also for review.