Advertisement
sc0ttkclark

Untitled

Mar 29th, 2011
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. <?php
  2. $default_Link = "/reports/the-report/";
  3. $selectorTax = pods_url_variable('last');
  4.  
  5. $pods = new Pod('custom_report_fields');
  6. $pods->findRecords('t.id', -1, "report_taxonomy.slug = '{$selectorTax}' AND t.am_reportisarchived = 0");
  7. $all_pods = $pods->getTotalRows();
  8.  
  9. $taxDesc = get_terms('cei_taxonomy', 'get=all&slug=' . $selectorTax);
  10. if(0 < $all_pods) {
  11. ?>
  12. <div id="content">
  13. <div class="post_box">
  14. <div class="headline_area"><h1><?php echo $taxDesc[0]->name; ?></h1></div>
  15. <div class="format_text">
  16.  
  17. <div id="tax-desc">
  18. <?php echo $taxDesc[0]->description; ?>
  19. </div>
  20.  
  21. <h2><?php echo $taxDesc[0]->name; ?> Reports</h2>
  22. <ul id="cat_tax_list">
  23. <?php
  24. while ($pods->fetchRecord()) {
  25. $report_idnumb = $pods->get_field('id');
  26. $report_name = $pods->get_field('name');
  27. $report_code = $pods->get_field('report_code');
  28. $report_title = $pods->get_field('report_title');
  29. $report_slug = $pods->get_field('slug');
  30. $report_benefit_statement = $pods->get_field('report_benefit_statement');
  31. echo '<li id="report-id-' . $report_idnumb . '"><a href="' . $default_Link . '' . $report_slug . '">' . $report_title . ' (' . $report_code . ')</a>';
  32. if (0 < strlen($report_benefit_statement)) {
  33. echo ' - ' . $report_benefit_statement . '</li>';
  34. }
  35. else {
  36. echo '</li>';
  37. }
  38. }
  39. ?>
  40. </ul>
  41.  
  42. </div>
  43. </div></div>
  44. <?php
  45. }
  46. else {
  47. echo '404';
  48. }
  49. ?>
  50. <div id="sidebars">
  51. <?php thesis_build_sidebars(); ?>
  52. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement