Show image in news list, will not recognize associated image
Hi
I have started out with the Umbraco Business template, and am modifying it to fit my needs. In the news section I would like the list of news to display an associated image next to each news teaser.
In the NewsArticle doc type I have made a mediapicker with alias "newsPicsmall" on the introduction tab. This is the image I want to show in the list. (FYI: I have also added mediapicker with alias "newsPic" to the article tab, but that shouldn't affect this right?)
Then I have added the following to the umbNewsListItems.xslt:
It calls in the "substitute image" just fine, but it will not recognize that an image has been selected. Even though I have selected an image for all news articles, using the media picker with alias "newsPicsmall", it still shows the substitue image for all articles.
I hope someone can help me, I am at my wits end here .
Cheers
Ulla
P.S the above code works fine on another site where I'm using it to call in pictures in a list of employees, but that site is Umb v. 4.0.4.1, Could the version be what's causing the trouble?
Show image in news list, will not recognize associated image
Hi
I have started out with the Umbraco Business template, and am modifying it to fit my needs. In the news section I would like the list of news to display an associated image next to each news teaser.
In the NewsArticle doc type I have made a mediapicker with alias "newsPicsmall" on the introduction tab. This is the image I want to show in the list. (FYI: I have also added mediapicker with alias "newsPic" to the article tab, but that shouldn't affect this right?)
Then I have added the following to the umbNewsListItems.xslt:
It calls in the "substitute image" just fine, but it will not recognize that an image has been selected. Even though I have selected an image for all news articles, using the media picker with alias "newsPicsmall", it still shows the substitue image for all articles.
I hope someone can help me, I am at my wits end here .
Cheers
Ulla
P.S the above code works fine on another site where I'm using it to call in pictures in a list of employees, but that site is Umb v. 4.0.4.1, Could the version be what's causing the trouble?
Hi Ulla,
Yep - since Umbraco 4.1 beta2 the XML format has been changed (for the better!) - you should be able to get by with this:
/Chriztian
Need a bit more information - are you wanting to list mulitple news articles then directs the user to the article they click on?
THANKS Guys
Wow that's quick response!! and the above code from Chriztian works like a treat :D
You've just saved my day ;)
Cheers
Ulla
is working on a reply...