cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

​clear list of children via impex

0 Kudos
454

Hi there!

I'm working on an impex who will update a CMSNavigationNode, and I need to clear the current list of children, before put another children's list.

I'm new about creation of impex files and her sintax, how can I make it?

Here i's my current impex:

INSERT_UPDATE CMSNavigationNode;uid[unique=true];$contentCV[unique=true];name;title;parent(uid, $contentCV);children(uid,$contentCV)[mode=append];links(uid, $contentCV);&nodeRef;parentPOS;
;PersonalDetailsNavNode;;Personal Details;Minha Conta;MyAccountNavNode;;;PersonalDetailsNavNode;1
;AddressBookNavNode;;Address Book;Meus Endereços;MyAccountNavNode;;;AddressBookNavNode;2
;OrderHistoryNavNode;;Order History;Meus Pedidos;MyAccountNavNode;;;OrderHistoryNavNode;3
;SignOutNavNode;;Sign Out;Sair;MyAccountNavNode;;;SignOutNavNode;4

Thanks for your time!

Accepted Solutions (0)

Answers (2)

Answers (2)

adiputera
Active Participant

You don't need to clear the content of children first, just remove [mode=append] from your impex file when you want to replace existing children.

[mode=append] will append to current children, without append mode, impex will replace current children

INSERT_UPDATE CMSNavigationNode;uid[unique=true];$contentCV[unique=true];name;title;parent(uid, $contentCV);children(uid,$contentCV);links(uid, $contentCV);&nodeRef;parentPOS;
;PersonalDetailsNavNode;;Personal Details;Minha Conta;MyAccountNavNode;newChildren1,newChildren2;;PersonalDetailsNavNode;1

deepak_madan7
Product and Topic Expert
Product and Topic Expert
0 Kudos

You can use UPDATE instead of INSERT_UPDATE which will update with the latest list that you provide.