none
Display the actual attachments(Image) in Announcements list? RRS feed

  • Question

  • I have a custom web part on my home page pulling data from the announcements
    list. When a user clicks on the Title (I have created it as a link) it directs  to the page shown in the picture below.

    I would like to modify the attachment field to display the image itself and
    not just the link/name of the attachment. How can I do this?

    Thursday, April 26, 2012 5:18 PM

All replies

  • You cannot do that

    but you can creat a custom column name image of type publishing Image and the image will be displayed


    Ramez Al kara Software Consultant MCITP SHAREPOINT

    Friday, April 27, 2012 4:13 PM
  • Hey Ramez

    Yes! I actually did exactly that and it works.

    But my objective is quite different.

    I am pulling this attachment into a custom web part on my home page.

    Now, I can have the user add the image twice (once as an attachment and again int he custom column I created), which works,

    but its an overhead to the user I want to avoid. I tried pulling the image from the custom column I created, but am having a tough time setting the url of it.

    Hope this makes what I am trying to achieve a bit clearer.

    Thanks

    Friday, April 27, 2012 5:28 PM
  • so you are looking for the code to set get the image url so that you can use it in your custom web part

    of so can you please copy paste you custom web part code here to help u more


    Ramez Al kara Software Consultant MCITP SHAREPOINT

    Friday, April 27, 2012 5:42 PM
  • Ramez

     I think I may have confused you with all the previous clutter.

    Let me explaint he current set up :

    I have a custom visual web part that has a repeater control with an item template showing Images and Titles horizontally. Take a look a the picture.

    These images are the attachments from the announcements list. When I change this to a custom column (thus not using the attachments field at all) I am having trouble changing the url to fetch from this custom column


    Friday, April 27, 2012 6:30 PM
  • yes I understand thats why I am asking you to paste your code here

    To help u in fetching the url from custom column it would be helpfull if you also tell me the type of the customn column (text, publisihng image ...)


    Ramez Al kara Software Consultant MCITP SHAREPOINT

    Friday, April 27, 2012 6:33 PM