I have a site set up, where i need to have one of menu items link to a file in the media section.
What i have done is creat a document type called "PDF link". On this document type i have a media picker.
So i thought giving this media picker the alias "umbracoRedirect" would do the trick, but i was wrong. umbracoRedirect apparently only works with content...
How do i get this to work in the simplest possible way, preferbly without .net code?
Nice try with the "umbracoRedirect" alias - I like your thinking! But as you found out it wouldn't work.
The problem is that with a media-type, you have to know its property aliases too. The only way I can see this working is by using XSLT to build the menu/nav links.
You can test if the media-picker has a value, then call GetMedia and render out the "umbracoFile" path instead of calling "NiceUrl".
link to media file from menu
I have a site set up, where i need to have one of menu items link to a file in the media section.
What i have done is creat a document type called "PDF link". On this document type i have a media picker.
So i thought giving this media picker the alias "umbracoRedirect" would do the trick, but i was wrong. umbracoRedirect apparently only works with content...
How do i get this to work in the simplest possible way, preferbly without .net code?
Hi Claushingebjerg,
Nice try with the "umbracoRedirect" alias - I like your thinking! But as you found out it wouldn't work.
The problem is that with a media-type, you have to know its property aliases too. The only way I can see this working is by using XSLT to build the menu/nav links.
You can test if the media-picker has a value, then call GetMedia and render out the "umbracoFile" path instead of calling "NiceUrl".
Cheers, Lee.
Cool. Thanks for the pointer...
I did it this way
Great, just what i needed :) Thx for the code!
Yeah thx... works like a charm
is working on a reply...