Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi guys
I am retrieving content using C# code which is working great via the IPublishedCache (UmbracoCOntext.Content and UmbracoContext.Media)
IPublishedCache
UmbracoCOntext.Content
UmbracoContext.Media
How could i determine what file type is being used as a general document has
umb://document//
in the URL, but a media file has
umb://media/
Ideally i just want to take an action once i have determined the type of file it is.
Was considering to check if the URL contains media or document in the URL but think there must be a better way.
Thanks
The returned value from umbracoContext.Media or .Content has an ItemType property, is that what you need?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
How to determine the type of file content is linked to?
Hi guys
I am retrieving content using C# code which is working great via the
IPublishedCache
(UmbracoCOntext.Content
andUmbracoContext.Media
)How could i determine what file type is being used as a general document has
in the URL, but a media file has
Ideally i just want to take an action once i have determined the type of file it is.
Was considering to check if the URL contains media or document in the URL but think there must be a better way.
Thanks
The returned value from umbracoContext.Media or .Content has an ItemType property, is that what you need?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.