As stated above all appears to work correctly. My main issue is that I would prefer if the users could select the internal url from within Umbraco. I looked at the 'Related Links' but decided not to use this as 1) I could not extract the url from the Link attribute and 2) I thougth that the datatype was a bit overkill for what i want to acheive.
In addition is it possible to change the href/src attribute URLS to match the stucture of the media folder. E.g /media/1295/falcon_logo.jpg to /media/logos/falcon_logo.jpg.
Any help or advice would be greatly appericated.
Eddie
P.s Did I need to create the new image media type?
I think I almost there. I still using the new media image type, but have change the internalurl property to the content picker and have updated the xlst to:
Think I've got a good solution. Still using the new media image type with the internalUrl (content picker), but have updated the xlst so that the <a> tag is only produced when the internalUrl has been selected.
Creating an Image with an internal URL
Hi All
Have just started using Umbraco, and am very impressed. But unforunalty I need some help/advice.
I would like to create an unordered list of all the images in a media folder which has been selected by the editior. The markup should be as below:
I have mananged to acheive this, although I'm not sure if its the best approach and if it's a bit of a hack. Here what I have done.
1) Created a new media type image, which has a two additional Textstring properties called 'altText' and 'internalUrl'.
2) Within the Homepage document type I Created a Media Picker with the alias of 'testImage'.
3) Created an xslt to loop throught the selected folder and create each list item.
4) Added the Macro to the master template.
As stated above all appears to work correctly. My main issue is that I would prefer if the users could select the internal url from within Umbraco. I looked at the 'Related Links' but decided not to use this as 1) I could not extract the url from the Link attribute and 2) I thougth that the datatype was a bit overkill for what i want to acheive.
In addition is it possible to change the href/src attribute URLS to match the stucture of the media folder. E.g /media/1295/falcon_logo.jpg to /media/logos/falcon_logo.jpg.
Any help or advice would be greatly appericated.
Eddie
P.s Did I need to create the new image media type?
Hi All
I think I almost there. I still using the new media image type, but have change the internalurl property to the content picker and have updated the xlst to:
Which allows the editor to choose the internalUrl from a the main site tree.
Thanks in advance.
Eddie
Hi All
Think I've got a good solution. Still using the new media image type with the internalUrl (content picker), but have updated the xlst so that the <a> tag is only produced when the internalUrl has been selected.
Please let me know if this is a good approach or if there a more efficient way to do this. Especially without the new image type>
Thanks
Eddie
is working on a reply...