Image displayed based on content type

This is what I want to do and I want to know the best way to do it. I have defined a custom list A with six custom content types. I want to be able to link that list based on its content type with another list B that contains 2 fields (content type name and the url to an image of the content type). I do not want to have to select the image when creating the list item in list A because I have already selected to create an item of that specific content type. Additionally I do not really want the image url stored in the list A list item because I want the ability to change the url to the image for the item and then the view will change for all the items of that content type. Further I would like to be able to add another content type for list A and then add an item to the list B that contains the name of the content type and the url to the image and the query view will understand which image to display. Whats the best way to accomplish this.


Answer this question

Image displayed based on content type

  • search and deploy

    I think i might have found a way. To get the content column string all I had to do was to insert a calculated column and add Content Type. I can't believe I initially tried to program that. What a waste of time. Now the question is can I run a query inside of a query using the query content web part I want to be able to query list B inside of the xsl for the content query webpart.

  • andret1802

    Ok I figured it out using the linked sources using sharepoint designer. I just didn't go far enough nor read the directions to do what I wanted to do.

  • Image displayed based on content type