• Resolved ffiachra

    (@ffiachra)


    Hi. Firstly, this plugin is great. Really robust and very versatile!

    on a page I am using the shortcode [pdb_single] to display a set of fields for a single database entry as normal.

    On this page I would also like to display a list of all other entries which have the same value in one field as the single entry we are viewing.

    For example – If one is viewing the details of an entry with “Group Number” of “003” I would like to be able to see a table of search results on the same page with other entries that have a “Group Number” of “003” also. (where “group number” is a field I have created and “003” is one of several values entered for this field)

    I don;t mind if the solution is in shortcode parameters or if I have to create or edit a template.

    Looking forward to your response

    https://www.ads-software.com/plugins/participants-database/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter ffiachra

    (@ffiachra)

    Just for clarity – an example of what exactly I would like to do is here:
    https://www.blacksodbayemigration.ie/passenger/5-margaret-gallagher/

    The rows with the title “Sailing Party” link to single entries of other members of the same sailing party.

    I know achieving this may require customisations but just wanted to check if all of the functionality includes scope for this.

    Thanks

    Plugin Author xnau webdesign

    (@xnau)

    Yes, this is possible with a custom plugin template. You would create a template for the single record, and in that template, you would include PHP code to invoke the list, inserting the group value into the shortcode filter attribute.

    For instance:

    <?php echo do_shortcode('[pdb_list filter="group_number=' . $this->participant_values['group_number'] . '"') ?>

    Would print the list of records in that group.

    You’ll probably want to place that outside of any HTML containers in the template, since it will be generating it’s own containers.

    Thread Starter ffiachra

    (@ffiachra)

    This worked a treat (one more square bracket to add near the end):

    <?php echo do_shortcode(‘[pdb_list filter=”group_number=’ . $this->participant_values[‘group_number’] . ‘”]’) ?>

    Thank you so much for your fast help and for developing this wonderful plugin!

    Plugin Author xnau webdesign

    (@xnau)

    Ahh good catch…didn’t look at my code closely enough!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Displaying search results relevant to current database entry’ is closed to new replies.