Answers.Body: <p>Seems like you want to create a custom <code>Element</code> or you would like to extend the existing <code>Entry</code> Element.
  It is all stated in the <a href="https://github.com/craftcms/docs/blob/v3/en/element-types.md" rel="nofollow noreferrer">docs</a> You can see how to create custom actions as well <a href="https://github.com/craftcms/docs/blob/v3/en/element-action-types.md" rel="nofollow noreferrer">here</a></p>
  
  <p><a href="https://github.com/craftcms/docs/blob/v3/en/element-types.md#index-page" rel="nofollow noreferrer">Here</a> is stated how to create a custom index page </p>
  
  <pre><code>{% extends '_layouts/elementindex' %}
  {% set title = 'Products' %}
  {% set elementType = 'ns\\prefix\\elements\\Product' %}
  </code></pre>
  
  <p>You can then extend the <a href="https://github.com/craftcms/cms/blob/develop/src/web/assets/cp/src/js/BaseElementIndex.js" rel="nofollow noreferrer">BaseElementIndex</a> in order to change Javascript functionality</p>
  
  <pre><code>Craft.elementIndex = Craft.createElementIndex('{{ elementType|e("js") }}', $('#main'), {
      context:        '{{ context }}',
      storageKey:     'elementindex.{{ elementType }}',
      criteria:       Craft.defaultIndexCriteria
  });
  </code></pre>
  
  <p>You can as well make use of certain <a href="https://github.com/craftcms/docs/blob/v3/en/updating-plugins.md#events" rel="nofollow noreferrer">events</a> like </p>
  
  <pre><code>Event::on(Elements::class, Elements::EVENT_AFTER_SAVE_ELEMENT, function($event){
      // resave all other elements
  });
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-04T18:32:40.523Z
Answers.Text: Thanks.  I think is leading down the right path so I will accept it as the answer.  Appreciate it.
Answers.UserDisplayName: Chris
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-04T16:45:53.207Z
Answers.LastActivityDate: 2018-04-04T16:45:53.207Z
Answers.UserDisplayName: Robin Schambach
Body: <p>I am looking to see if there is an easy way or already a plugin available that would replicate the entries structure layout.  I plan on creating a plugin that would allow an admin to mass update a select set of fields.  </p>
  
  <p>I notice it does an ajax call to index.php?p=admin/actions/elementIndex/getElements to get the first 50 entries and then subsequent calls to get more as you get near the end of the results.</p>
  
  <p>I see one of 3 potential ways to do it and wondering which way would be ideal.  </p>
  
  <ol>
  <li><p>Try and call this same ajax call as it returns the html and do some manipulation to the html to add additional functionality I need.</p></li>
  <li><p>Find methods that are being called from craft core and copy them into my plugin and modify as needed then do similar ajax call to my plugin.</p></li>
  <li><p>Just write my own custom code to grab what I need.  </p></li>
  </ol>
  
  <p>I am leaning on number 2 as the ideal scenario but have not looking to see if this  is unreasonable as it may be tied to a lot of different areas of the core code.  </p>
  
  <p>Looking to get some opinions as I am guessing others have already gone down this road.</p>
  
  <p>Thanks</p>
  
  <p>UPDATE with more info</p>
  
  <p>I want to mimic the entries admin structure layout page for a specific section.  Once I mimic it I will add a little different functionality to it.  So currently you can select multiple entries and mass update the status or delete those entries and that is it.  I plan to add some additional options to change some custom fields that are associated with that section.  So if I am in the admin and I go to /admin/entries/meetings and meetings is a section with a type of structure I would see the tree layout of all the meetings in my case it is 5 levels deep.  There are 3 custom fields that change monthly and when they change about 30% of the meetings setup need to be changed.  The idea is they could select all of them that need these 3 fields updated and can do a mass update.  Currently they have to go into each meeting and make the change which is very time consuming.  Hope that makes more sense.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-04T16:00:39.773Z
Comments.Text: What do you mean exactly by "replicate entries structure layout". Do you want to create a new section with the same entries like an existing? Or do you just want to resave all elements (which can be done with an already existing function)
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-04T16:12:44.363Z
Comments.Text: Left some more details of what I am looking for.
Comments.UserDisplayName: Chris
Tags: <plugin-development><entries><structure><admin>
Title: Replicate entries structure in admin
ThreadText: # Replicate entries structure in admin
  
  (Asked by: username_0 on 2018-04-04)
  
  I am looking to see if there is an easy way or already a plugin available that would replicate the entries structure layout. I plan on creating a plugin that would allow an admin to mass update a select set of fields.
  
  I notice it does an ajax call to index.php?p=admin/actions/elementIndex/getElements to get the first 50 entries and then subsequent calls to get more as you get near the end of the results.
  
  I see one of 3 potential ways to do it and wondering which way would be ideal.
  
  1. Try and call this same ajax call as it returns the html and do some manipulation to the html to add additional functionality I need.
  2. Find methods that are being called from craft core and copy them into my plugin and modify as needed then do similar ajax call to my plugin.
  3. Just write my own custom code to grab what I need.
  
  I am leaning on number 2 as the ideal scenario but have not looking to see if this is unreasonable as it may be tied to a lot of different areas of the core code.
  
  Looking to get some opinions as I am guessing others have already gone down this road.
  
  Thanks
  
  UPDATE with more info
  
  I want to mimic the entries admin structure layout page for a specific section. Once I mimic it I will add a little different functionality to it. So currently you can select multiple entries and mass update the status or delete those entries and that is it. I plan to add some additional options to change some custom fields that are associated with that section. So if I am in the admin and I go to /admin/entries/meetings and meetings is a section with a type of structure I would see the tree layout of all the meetings in my case it is 5 levels deep. There are 3 custom fields that change monthly and when they change about 30% of the meetings setup need to be changed. The idea is they could select all of them that need these 3 fields updated and can do a mass update. Currently they have to go into each meeting and make the change which is very time consuming. Hope that makes more sense.
  
  **Tags:** plugin-development, entries, structure, admin
  
  > **Comments:**
  > **username_1**: What do you mean exactly by "replicate entries structure layout". Do you want to create a new section with the same entries like an existing? Or do you just want to resave all elements (which can be done with an already existing function)  
  > **username_0**: Left some more details of what I am looking for.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-04-04. Score: 1 | Accepted answer
  
  Seems like you want to create a custom `Element` or you would like to extend the existing `Entry` Element.
  It is all stated in the [docs](https://github.com/craftcms/docs/blob/v3/en/element-types.md) You can see how to create custom actions as well [here](https://github.com/craftcms/docs/blob/v3/en/element-action-types.md)
  
  [Here](https://github.com/craftcms/docs/blob/v3/en/element-types.md#index-page) is stated how to create a custom index page
  
  ```
  {% extends '_layouts/elementindex' %}
  {% set title = 'Products' %}
  {% set elementType = 'ns\\prefix\\elements\\Product' %}
  
  ```
  
  You can then extend the [BaseElementIndex](https://github.com/craftcms/cms/blob/develop/src/web/assets/cp/src/js/BaseElementIndex.js) in order to change Javascript functionality
  
  ```
  Craft.elementIndex = Craft.createElementIndex('{{ elementType|e("js") }}', $('#main'), {
      context:        '{{ context }}',
      storageKey:     'elementindex.{{ elementType }}',
      criteria:       Craft.defaultIndexCriteria
  });
  
  ```
  
  You can as well make use of certain [events](https://github.com/craftcms/docs/blob/v3/en/updating-plugins.md#events) like
  
  ```
  Event::on(Elements::class, Elements::EVENT_AFTER_SAVE_ELEMENT, function($event){
      // resave all other elements
  });
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks.  I think is leading down the right path so I will accept it as the answer.  Appreciate it.  
  
  ---
  
  