Answers.Body: <p>You're on the right track with both of those. First, <a href="http://buildwithcraft.com/docs/plugins/hooks-reference#modifyEntryTableAttributes" rel="nofollow">modifyEntryTableAttributes</a>.</p>
  
  <blockquote>
    <p>Gives plugins a chance to modify the table columns shown on the entry index page.</p>
  </blockquote>
  
  <p>This lets you name the column for your author info. It's a <a href="http://buildwithcraft.com/docs/plugins/hooks-and-events#hooks" rel="nofollow">hook</a>, so you'll need to add a public method with the same name as that that to your main plugin class. You can also limit the column to particular section by checking the <code>$source</code> variable.</p>
  
  <pre><code>public function modifyEntryTableAttributes(&amp;$attributes, $source)
  {
      if ($source == 'section:3')
      {
          $attributes['author'] = Craft::t('Author');
      }
  }
  </code></pre>
  
  <p>Then to actually return the information, you need <a href="http://buildwithcraft.com/docs/plugins/hooks-reference#getEntryTableAttributeHtml" rel="nofollow">getEntryTableAttributeHtml</a>.</p>
  
  <blockquote>
    <p>Gives plugins a chance to customize the HTML of the table cells on the entry index page.</p>
  </blockquote>
  
  <p>Here you can just check for the attribute you set above, and return a string.</p>
  
  <pre><code>public function getEntryTableAttributeHtml(EntryModel $entry, $attribute)
  {
      if ($attribute == 'author')
      {
          return $entry-&gt;getAuthor()-&gt;getFriendlyName();
      }
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-14T02:46:45.940Z
Answers.Text: Yes thats right answer. I had it but it was not working because of a conflict with DashCols plugin indeed. So I disabled the plugin and it works great. Now I just know that its DashCols plugin or all custom made. One way or the other... not both.
Answers.UserDisplayName: migmaker
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-14T01:30:00.257Z
Answers.LastActivityDate: 2015-08-14T01:30:00.257Z
Answers.UserDisplayName: Mike Pepper
Answers.Body: <p>From what I understand I think the methods you reference are for when you create a plugin with its own custom element type, I don't think you can interact with the entry listing as standard without a plugin. </p>
  
  <p>I do think there is a plugin which might help you achieve this though without having to write your own.</p>
  
  <p><a href="https://github.com/mmikkel/DashCols-Craft/" rel="nofollow">https://github.com/mmikkel/DashCols-Craft/</a></p>
  
  <p>From the looks of things this should let you add custom fields to the entry listing page, I haven't actually used this but it looks solid.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-13T23:19:16.117Z
Answers.Text: I use it all the time but in my case its useless because I want a field from a relationTo entry (the author of the entry)... Not possible with DashCols.
Answers.UserDisplayName: migmaker
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-13T23:07:34.287Z
Answers.LastActivityDate: 2015-08-13T23:07:34.287Z
Answers.UserDisplayName: Alec Ritson
Body: <p>In CP Craft Admin in the entries table view I d like to display some authors meta info.<br>
  How could I do that in my plugin?<br>
  I know <code>public function modifyEntryTableAttributes(&amp;$attributes, $source)</code> and <code>public function getEntryTableAttributeHtml(EntryModel $entry, $attribute)</code>and but I cannot make it work.</p>
  
Tags: <entries-field><author>
Title: Add entry author meta field in entries listing table in CP?
ThreadText: # Add entry author meta field in entries listing table in CP?
  
  (Asked by: username_0 on 2015-08-13)
  
  In CP Craft Admin in the entries table view I d like to display some authors meta info.  
  How could I do that in my plugin?  
  I know `public function modifyEntryTableAttributes(&$attributes, $source)` and `public function getEntryTableAttributeHtml(EntryModel $entry, $attribute)`and but I cannot make it work.
  
  **Tags:** entries-field, author
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-08-14. Score: 2 | Accepted answer
  
  You're on the right track with both of those. First, [modifyEntryTableAttributes](http://buildwithcraft.com/docs/plugins/hooks-reference#modifyEntryTableAttributes).
  
  > Gives plugins a chance to modify the table columns shown on the entry index page.
  
  This lets you name the column for your author info. It's a [hook](http://buildwithcraft.com/docs/plugins/hooks-and-events#hooks), so you'll need to add a public method with the same name as that that to your main plugin class. You can also limit the column to particular section by checking the `$source` variable.
  
  ```
  public function modifyEntryTableAttributes(&$attributes, $source)
  {
      if ($source == 'section:3')
      {
          $attributes['author'] = Craft::t('Author');
      }
  }
  
  ```
  
  Then to actually return the information, you need [getEntryTableAttributeHtml](http://buildwithcraft.com/docs/plugins/hooks-reference#getEntryTableAttributeHtml).
  
  > Gives plugins a chance to customize the HTML of the table cells on the entry index page.
  
  Here you can just check for the attribute you set above, and return a string.
  
  ```
  public function getEntryTableAttributeHtml(EntryModel $entry, $attribute)
  {
      if ($attribute == 'author')
      {
          return $entry->getAuthor()->getFriendlyName();
      }
  }
  
  ```
  
  > **Comments:**
  > **username_0**: Yes thats right answer. I had it but it was not working because of a conflict with DashCols plugin indeed. So I disabled the plugin and it works great. Now I just know that its DashCols plugin or all custom made. One way or the other... not both.  
  
  ---
  
  ### Answer by username_2 on 2015-08-13. Score: 1
  
  From what I understand I think the methods you reference are for when you create a plugin with its own custom element type, I don't think you can interact with the entry listing as standard without a plugin.
  
  I do think there is a plugin which might help you achieve this though without having to write your own.
  
  <https://github.com/mmikkel/DashCols-Craft/>
  
  From the looks of things this should let you add custom fields to the entry listing page, I haven't actually used this but it looks solid.
  
  > **Comments:**
  > **username_0**: I use it all the time but in my case its useless because I want a field from a relationTo entry (the author of the entry)... Not possible with DashCols.  
  
  ---
  
  