Need basic help with PDbTemplate class
-
I’m new to the whole php/css world (yeah, sorry) so I’m working my way through this. Love the plugin so far I just need some help going forward.
My Participants database has three “types” of participants: venues, troupes, performers
– I created separate groups for the type-specific fields and a common group for the common fields.
– My submission_type field captures the page slug of the sign-on page usedI have three list pages that use the php_list shortcode using groups= and some filtering to get the results that I want.
** All is working up to this point **
GOAL:
On each list page I want to click a field (‘ld_name’ is a common field) and have it display a single record page…. with that single record only displaying the appropriate groups for its submission_type.SO FAR:
I created a copy of pdb-single-default.php and put it in the templates folder of my current WP template, renaming it pdb-single-performer.php.I edited the exclude statement so that it excludes the venue and troupe fields.
Yay, all this works. For *performers*…
PDBTEMPLATE CLASS ISSUES:
I assume the answer lies with the PDbTemplate class and using the Switch/Case structure (??) to set up each single record response the way I want it to display.BUT… I ran into problems right away so I kept cutting my file down further and further.
At this point I have a VERY simple pdb-single-submission.php file in my templates folder only it isn’t returning anything.
I am VERY new to all of this, so I’m guessing I am missing something really basic.
<?php /* * template for displaying a single record using IBinfo data * * single record template */ // get the template object for this record $this_submission = new PDb_Template($this); ?> <h1> <?php $this_submission->print_field('ld_name') ?> </h1>That’s the extent of my file…
I appreciate assistance.
The topic ‘Need basic help with PDbTemplate class’ is closed to new replies.