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,
In a partial view, how can i determine the documentType of an item to display some other things?
I want to do something like:
if (item.documentType == "ExternalLink"){ Do this } else {do that} }
Hi Robert
You should be able to use item.DocumentTypeAlias == "ExternalLink"...so this should work
@if(item.DocumentTypeAlias == "ExternalLink"){ //Your code here }
/Jan
Hi Robert,
I think something like this will work for you if not could you please share your whole code.
if(item.DocumentTypeAlias == "ExternalLink"){ Do this}else { do that}
Hope this helps,
/Dennis
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Determine the DocumentType
Hi,
In a partial view, how can i determine the documentType of an item to display some other things?
I want to do something like:
Hi Robert
You should be able to use item.DocumentTypeAlias == "ExternalLink"...so this should work
/Jan
Hi Robert,
I think something like this will work for you if not could you please share your whole code.
Hope this helps,
/Dennis
is working on a reply...