Support

Home Forums Event Espresso Premium How to add Staff to EE4 Table View Template

How to add Staff to EE4 Table View Template

Posted: April 3, 2016 at 2:39 pm


Greg Davis

April 3, 2016 at 2:39 pm

I have been looking around for instructions on how to customize the new EE4 table view template. I found this post which seems to be in the right general direction: https://eventespresso.com/topic/creating-custom-template-ee4-table-view-addon-2/

However, what I need to to be able to add a column for staff member. My client has a painting class site and we are using the people add-on. We created a type called “artist” which is the instructor of the class. In the table view, we need to add the name of the artist who is assigned for that event.

Is it possible to do this?

Thanks,
Greg


Josh

  • Support Staff

April 4, 2016 at 12:40 pm

Hi Greg,

Yes this is possible and it does require some PHP and html modifications to your table view template. It its simplest form, the modification can be as simple as this:

1) You add a column to the table header, i.e.:
<th class="th-group">Artist</th>
2) You add this to the loop:

$artist = '';
$artist = EEH_Template::locate_template( 'content-espresso_events-people.php' );

3) You add the table cell to the table:
<td class="artist"><?php echo $artist; ?></td>

Further customization of the above is possible if you copy the code from the People add-on’s content-espresso_events-people.php template, customize the code, and load that template instead of the one from step 2.

The support post ‘How to add Staff to EE4 Table View Template’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso