• Resolved arr0w

    (@arr0w)


    Is it possible to show a Private ID link on the pdb_list, like the admin page?

    I’m trying to make a custom list of editable users, which only logged in users can access (a private page)

Viewing 5 replies - 16 through 20 (of 20 total)
  • Plugin Author xnau webdesign

    (@xnau)

    That means you have an error somewhere. Make sure the PHP tags are right, make sure you are defining $record with $record = new PDb_Template($this); and check to make sure all your syntax is correct…

    if you can’t find it, post your template here.

    Thread Starter arr0w

    (@arr0w)

    Of course, but where?
    I tried wrapping your suggestion in <?php ?>

    But I’ve probably misplaced something… This it your suggested code to add:

    if ($this->field->name == ‘edit_link’) {
    $this->field->link = $record->get_edit_link();
    }

    And here is the part of the template we are talking about (responsive list):

    <?php if ( $record_count > 0 ) : ?>

    <?php while ( $this->have_records() ) : $this->the_record(); // each record is one row ?>
    <section id=”record-<?php echo $this->record->record_id ?>”>
    <?php while( $this->have_fields() ) : $this->the_field(); // each field is one cell ?>
    <?php if ( $this->field->has_content() ) : ?>

    <div class=”pdb-field”>
    <span class=”pdb-field-title”><?php echo $this->field->title ?></span>
    <span class=”pdb-field-data”><?php echo PDb_FormElement::get_field_value_display($this->field); ?></span>

    </div>
    <?php else : // if the field is empty ?>
    <?php endif ?>

    <?php endwhile; // each field ?>
    </section>
    <?php endwhile; // each record ?>

    Plugin Author xnau webdesign

    (@xnau)

    OK, if post your template, I can help you see where the problem is.

    Thread Starter arr0w

    (@arr0w)

    The above is my template. I just need to know where to place the
    if ($this->field->name == ‘edit_link’) {
    $this->field->link = $record->get_edit_link();
    }

    As I said I tried wrapping it in php tags and inserting both before and after the if ( $this->field->has_content() ) :

    I’m not quite sure what you want me to do.

    Thread Starter arr0w

    (@arr0w)

    So I figured it out. And the mistake was mine… Thank you for your help and Happy New year!

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Private ID link on pdb_list’ is closed to new replies.