title: What is the correct pattern to write to joomla assets table?
body: <p>I'm currently modifying a component to include ACL support.
  I would like to create the correct <code>#_assets</code> row for every category/item created.
  What would the correct procedure be to respect hierarchy and recompute <code>lft</code> and <code>rght</code> values?</p>
  
  <p>Example:<br>
  Component</p>
  
  <ul>
  <li>Category  (lft:0 rght:1)
  <ul>
  <li>Item     (lft:2 rght:3)</li>
  </ul></li>
  <li>Category  (lft:4 rght:5)
  <ul>
  <li>Item     (lft:6 rght:7)</li>
  <li><strong>New Item (lft:? rght:?)</strong></li>
  </ul></li>
  <li>Category  (lft:8 rght:9)</li>
  </ul>