Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

How to tell if IContent is an asset or a page link?

$
0
0

Basically, I have a LinkItemCollection property on a block, and when it's displayed I'd like to add special HTML if it's an external link or if it's a file (pdf or word file or similar) rather than an internal episerver page. 

I already have an "IsInternal()" method that examines the Href and historically works well, but struggling to find a method to tell the difference between different internal links, page vs image vs pdf etc.


Viewing all articles
Browse latest Browse all 6894

Trending Articles