• Resolved iHanky

    (@ihanky)


    Hi,

    So I managed to build a nice page with pdb-data:
    http://www.larmit.nl/caresse/index.php/dealers/

    The circles on the map are shown by using this code:
    <a class="<?php echo $this->record->fields['dealer_type']->value ?>dealer" style="position:absolute; left:<?php echo $this->record->fields['x_coordinaat']->value ?>px; top:<?php echo $this->record->fields['y_coordinaat']->value ?>px; z-index:10;" href="http://www.larmit.nl/caresse/index.php/dealers/dealerpagina/?pdb=<?php echo $this->record->fields['id']->value ?>" ><b></b><span><?php echo $this->record->fields['city']->value ?></span></a>

    There’s only 1 thing not working, this:
    href="http://www.larmit.nl/caresse/index.php/dealers/dealerpagina/?pdb=<?php echo $this->record->fields['id']->value ?>

    should result in something like this:
    href="http://www.larmit.nl/caresse/index.php/dealers/dealerpagina/?pdb=23

    but gives me:
    href="http://www.larmit.nl/caresse/index.php/dealers/dealerpagina/?pdb=

    How do I get the id?

    Tnx in advance.

    http://wordpress.org/extend/plugins/participants-database/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xnau webdesign

    (@xnau)

    You’re close. The structure of the record object is a little different. You need to include the group that the field is in and also the field name is a property of the fields object…like so:

    $this->record->main->fields->id->value

    Thread Starter iHanky

    (@ihanky)

    Goodmorning,
    This does not work. I think the solution has to be found here:
    This is the shortcode I use to get the right values for my map:
    [pdb_list template="ori" fields="city, x_coordinaat, y_coordinaat, dealer_type, id"]

    I tried to show the id in other tables but it did not show anywhere.
    So I wonder if ‘id’ is the right filed-name to show the Record ID?

    The other shortcodes work ok, for example:
    [pdb_list template="caresse" fields="bedrijfsnaam, city, address" filter="dealer_type=silver" orderby="bedrijfsnaam" order="asc"]
    gives me a nice table.
    When I replace address with ‘private_id’ it shows the Private ID, when I replace it with ‘id’ it does not show anything.

    I solved the problem for now by adding a field called My ID which I manually give the same value as the Record ID.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Getting the pdb-id’ is closed to new replies.