Answers.Body: <p>This did the trick:</p>
  
  <pre><code> craft()-&gt;sections-&gt;reorderEntryTypes($entryTypeIds);
  </code></pre>
  
  <p>Where <code>$entryTypeIds</code> is an array with all the id's in the correct order</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-30T07:23:37.700Z
Answers.LastActivityDate: 2017-08-30T07:23:37.700Z
Answers.UserDisplayName: Sander Van Keer
Body: <p>I was wondering if there's a way to change the position of elements in an entry type structure. I want to change the positions of the elements when a user logs in, so I'll write it in a plugin.</p>
  
  <p>Any Ideas?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-30T06:54:48.463Z
Comments.Text: are you talking about frontend displaying the elements in a different order or in the admin panel?
Comments.UserDisplayName: mrsmn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-30T07:11:22.920Z
Comments.Text: Admin panel but I've found a solution
Comments.UserDisplayName: Sander Van Keer
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-30T07:12:15.663Z
Comments.Text: Feel free to post it here as an answer for future reference for other developers who might want to do the same thing.
Comments.UserDisplayName: mrsmn
Tags: <plugin-development><structure><position>
Title: Change position of entry types in a structure
ThreadText: # Change position of entry types in a structure
  
  (Asked by: username_0 on 2017-08-30)
  
  I was wondering if there's a way to change the position of elements in an entry type structure. I want to change the positions of the elements when a user logs in, so I'll write it in a plugin.
  
  Any Ideas?
  
  **Tags:** plugin-development, structure, position
  
  > **Comments:**
  > **username_1**: are you talking about frontend displaying the elements in a different order or in the admin panel?  
  > **username_0**: Admin panel but I've found a solution  
  > **username_1**: Feel free to post it here as an answer for future reference for other developers who might want to do the same thing.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-08-30. Score: 2
  
  This did the trick:
  
  ```
   craft()->sections->reorderEntryTypes($entryTypeIds);
  
  ```
  
  Where `$entryTypeIds` is an array with all the id's in the correct order
  
  
  ---
  
  