Replies: 0
I have been at this and just do not get it. I am using the custom php to list edit records with the edit link. Now all I want to do is add an if statement that will only display the record if the records user_login matches the current_login. I have a field user_login that works. I have the current_login info but I am confused on how to get the login value from $this-> ???? code from the custom edit-link. Everything I am trying is not working. What is the secret?
<tbody>
<?php while ( $this->have_records() ) : $this->the_record(); // each record is one row ?>
<?php $record = new PDb_Template($this); ?>
***** I want the if statement here to check…
<tr>
<?php while( $this->have_fields() ) : $this->the_field(); // each field is one cell ?>
<td class=”<?php echo $this->field->name ?>-field”>
<?php
/*
* put the edit link URL into the link property of the field
*/
if ($this->field->name == ‘edit_link’) {
$this->field->link = $record->get_edit_link();
}
$this->field->print_value();
?>
</td>
<?php endwhile; // each field ?>
</tr>
*** do all the above if the if statement holds true
<?php endwhile; // each record ?>
</tbody>