Technical support This forum is closed.
Version 1.x > Technical support > Relationships View modes: 
User avatar
Member
Member
Antony - 12/27/2005 10:28:54 AM
   
Relationships
Hello,

is it possible to refer to relationship directly from code?
I mean, is there any interface responsible for that?

I need to know how many articles relate to the current page.
And I really don't want to get this info from database.

Thanks,
Antony

User avatar
Guest
admin - 12/27/2005 6:24:45 PM
   
Re: Relationships
Hi Antony,

yes, you can do that using the code like this:

Dim tree As TreeProvider = Functions.GetTreeProvider
Dim ds As DataSet = tree.SelectNodes("/%", TreePathTypeEnum.AliasPath, "", "", "", -1, True, CType(Functions.GetCurrentDocument.GetValue("NodeID"), Integer), "myrelationship", False)
If ds.Tables(0).Rows.Count > 0 Then
'there is at lease one related document
End If

Should you need any additional details, please feel free to ask.

Best Regards,

User avatar
Member
Member
Antony - 12/29/2005 12:46:50 PM
   
Re: Relationships
It works.

Thanks a lot!