0

For an extension I would like to add an extra column in the cp's entries overview. I have searched for a hook I could use for this, but could not find anything.

I could use Zenbu, but that is a bit too much for what I want. In EE1 there was a hook available. Have I missed the hook for EE2 or is there another way to accomplish this?

2 Answers 2

0

Which page, specifically? Have you looked at the tab documentation?

https://ellislab.com/expressionengine/user-guide/development/modules.html#the-tab-file-tab-module-name-php

Expand on your answer I can probably help you.

1
  • The content_edit page. I haven't tought of looking at the tab documentation. I will look later into that. Jun 26, 2015 at 5:50
0

I decided to go with the hook cp_js_end. I linked it with this function:

function addJs(){
        $js = "
             if(window.location.href.indexOf('content_edit') > -1) 
             {
                var colNr = 2;  

                $('.mainTable').find('tr').each(function(){
                    $(this).find('th').eq(colNr).after('<th data-table_column=\'your-colomn-name\'>Your column name</th>');
                    $(this).find('td').eq(colNr).after('<td>Your content for this cell</td>');
               });
            }
        ";

        return $this->EE->extensions->last_call . $js;
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.