kwestalot

Untitled

Jul 15th, 2012
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. <div style="width:305px; float:right; padding-left:22px; margin: 5px 3px 20px 0">
  2. <div id="something">
  3.  
  4. <?php $practice_area = new Pod('practice_areas', pods_url_variable(-1)); // Area of practice for this page ?>
  5. <?php
  6. $params = array(
  7. 'orderby' => 'sort_order ASC'
  8. );
  9. $categories = new Pod('attorneys_category', $params); // Retrieve all categories
  10. ?>
  11.  
  12. <?php while ($categories->fetchRecord()) { ?>
  13. <?php
  14. // Get just the attorneys for this category and area of practice
  15. $params = array(
  16. 'where' => "category.id = " . $categories->get_field('id') . " AND practice_area.id = " . $practice_area->get_field('id'),
  17. 'orderby' => 'last_name ASC'
  18. );
  19. $attorneys = new Pod('attorneys', $params);
  20. ?>
  21.  
  22. <?php if ($attorneys->getTotalRows() > 0) { ?>
  23. <h3><?php echo $categories->get_field('name'); ?></h3>
  24. <ul class="logoblockgrid">
  25. <?php while($attorneys->fetchRecord()) { ?>
  26. <a href="/attorneys/<?php echo $attorneys->get_field( 'slug' );?>"><li><img src="<?php echo $attorneys->get_field('nav_photo.guid'); ?>"><?php echo $attorneys->get_field('name'); ?></li></a>
  27. <?php } // End attorneys for this category ?>
  28. </ul>
  29. <div style="clear:both"></div>
  30. <?php } // endif any attorneys to be listed ?>
  31.  
  32. <?php } // End category loop ?>
  33.  
  34. </div>
  35. </div>
  36.  
  37. <h1>{@name} Law</h1>
  38. {@description}
Advertisement
Add Comment
Please, Sign In to add comment