Troubles with Overriding Express_Entry_List

Permalink
I'm trying to display Team member info in custom card. I have populated the Team Members express object, and placed an Express Entry List block onto the page. I then configured the block to grab the team members.

I've copied the entire Express entry list folder from Concrete/blocks to Application/blocks, and then i replaced the content of view.php with what you see below. It hangs the page (meaning no part of the page appears). Clearly, I'm missing some really important things. Your help is greatly appreciated.

if ($entity) { ?>
    $results = $result->getItemListObject()->getResults();
    if (count($results)) { ?>
      <section class="container-fluid">
         <div class="row active-with-click justify-content-md-center">
            <?php foreach ($result->getItems() as $item) { 
            $member = $item->getEntry(); ?>
            <div class="col-md-4 col-sm-6 col-xs-12">  
               <article class="material-card Purple">
                  <h2><span><?=$member->getName()?></span>
                  <strong><i class="fa fa-fw fa-star"></i><?=$member->getPosition() ?></strong></h2>
                  <div class="mc-content">
                     <div class="img-container">
                        <img class="img-responsive" src="<?=$member->getImage() ?>">
                     </div>

jalen
 
jalen replied on at Permalink Reply
jalen
I'm not completely out of the woods yet, but I figured out that I needed to change a statement in the controller.php file:

I needed to change:
namespace Concrete\Block\ExpressEntryList;

To:
namespace Application\Block\ExpressEntryList;

Now I need to figure out how to get the URL of an image from an express entry object.
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Those namespaces look the same to me?
jalen replied on at Permalink Reply
jalen
Oops! I guess i was being a bit hasty. Let me fix it. However, that is ONLY needed if you're actually overriding the whole block... not if you want to create a custom template
jalen replied on at Permalink Best Answer Reply
jalen
I found the Ultimate Solution. As it turns out the Pixel 2 theme I was using had already implemented some custom templates for the express entry list. What I found there was far superior to anything I found anywhere. It seems the folks who created Pixel 2, REALLY know c5 and the Entity models. The code below includes functionality for searching (which I don't need, but you might):
<?php defined('C5_EXECUTE') or die(_("Access Denied."));
$c = Page::getCurrentPage();
if ($tableName) { ?>
    <h2><?php echo $tableName?></h2>
    <?php if ($tableDescription) {  ?>
        <p><?php echo $tableDescription?></p>
    <?php } ?>
<?php }
if ($entity) { ?>
    <?php if ($enableSearch) { ?>
        <form method="get" action="<?php echo $c->getCollectionLink()?>">
            <div class="form-inline">
                <div class="form-group">
                    <?php echo $form->label('keywords', t('Keyword Search'))?>
                    <?php echo $form->text('keywords')?>