When dealing with tool of creation/linking articles and elements, it is extremely important the order in which elements of library object are created. This regards both the frame to which you will set the article tool Create a new article, and the creation order of the body legs or all other multi-item elements.
The object with the least creation number has to be the one that will have article tool Create a new article while all others has to be set only for linking to the current article. |
If your library object creates more than one article, than for every article it's valid the rule that the object with the least creation number has to be the one that will have article tool Create a new article while all others has to be set only for linking to the current article. Of course, only for the first article you will look for the Frame#0; for other articles, you will look for the frame which has the least creation number in its own sequence. Example: there are 6 frames in library object, and you have to create 3 articles with them. Three frames are related to the first article, two frames are related to the second article, and one frame is related to the third article. This might be the sequence of setting the tool on frames. First article Frame#0 Create a new article Frame#1 Link Frame#2 Link Second article Frame#3 Create a new article Frame#4 Link Third article Frame#5 Create a new article |
The elements to which you assigned a Link tool are linked in the same order as they were created. Thus, ensure that the body legs index (Frame#X) is correct. See Reorder frames in the flow. |
When linking frames to an article with the AddSelectionToCurrentArticle command, if the current frame's type can be linked to multiple frames (typeLink = ''), there are considerations to have in mind. Let's assume that you want to set a library object that will automatically create a complex article containing one headline frame (kop), six body frames, and two inner blocks, consisting of an inzetkop frame and two inzet frames. Please note that during manual create, first two inzet frames are linked to the first inzet element, and second two inzet frames are linked to the second inzet element. What happens when you try to achieve the same with a library object? All inzet frames get linked to the first inzet element, and the second inzet element is not created. There's no way to avoid such behavior when dealing with library objects. First, there's no tool command "create article element", but the element creation relies on the frame type. If the inzet frame typeLink is set to multiple frames, then a new element will be created only for the first occurrence of such frame. Thus, the first inzet frame will create the first inzet element, but the second inzet frame will be linked to the first inzet element, as well as inzet frames #3 and #4. So, you end up with one inzet element. Should the inzet frame typeLink is set to single frame, then a new element will be created for each inzet frame, you will end up with four inzet elements. The workaround would be to define inzet2 element in the XML schema, and create the second set of inzet frames as inzet2. This requires to adjust all XSL stylesheets, and also to duplicate inzet formats also for inzet2 type. |