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,
I have created a new section where I want to create,delete and show nodes of type "Library". How can I do this?
Thanks beforehand.
Sincere regards,Eduardo Macho
To get all the documents which are using the "library" doctypealias you can use the following code:
DocumentType langDocType = DocumentType.GetByAlias("Library");
The above code gets an instance of the DocumentType, which is required for creating new nodes of a given docType.
To enumerate nodes of that docType (as mentioned in this post):
IEnumerable<Document> documents = Document.GetDocumentsOfDocumentType(langDocType.Id);
(If dealing with just published nodes I tend to use an XPath expression to get all documents of a particular docType)
HTH,
Hendy
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
Retrieving nodes of type 'x'
Hi,
I have created a new section where I want to create,delete and show nodes of type "Library". How can I do this?
Thanks beforehand.
Sincere regards,
Eduardo Macho
To get all the documents which are using the "library" doctypealias you can use the following code:
Hi,
The above code gets an instance of the DocumentType, which is required for creating new nodes of a given docType.
To enumerate nodes of that docType (as mentioned in this post):
(If dealing with just published nodes I tend to use an XPath expression to get all documents of a particular docType)
HTH,
Hendy
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.