Adding link to custom template in pdb-list
-
I’m trying to add a column to the list table. I have created
– placeholder field (tc_rpt)
– added it to display fields for public
– created custom template for the listI want the tc_rpt to load a single record template based on the rows RecordID.
I’ve tried a number of things, I currently have this to help illustrate:
<?php
if ($this->field->name === ‘tc_rpt’) {
$this->field->link = $record->echo do_shortcode(“[pdb_single template=’customtc’]”);
}
$this->field->print_value() ?>It is located here:
<tbody>
<?php while ( $this->have_records() ) : $this->the_record(); // each record is one row ?>
<tr>
<?php while ( $this->have_fields() ) : $this->the_field(); // each field is one cell ?><td class=”<?php echo $this->field->name() ?>-field”>
<?php
if ($this->field->name === ‘tc_rpt’) {
$this->field->link = $record->echo do_shortcode(“[pdb_single template=’customtc’]”);
}
$this->field->print_value() ?>
</td><?php endwhile; // each field ?>
</tr>
<?php endwhile; // each record ?>
</tbody>The page I need help with: [log in to see the link]
- The topic ‘Adding link to custom template in pdb-list’ is closed to new replies.