Add output for property images
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 11 Jul 2014 16:55:41 +0000 (12:55 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 11 Jul 2014 16:55:41 +0000 (12:55 -0400)
Setup for the two property images and getting the address which is in
the database.

Toolkit/Page.php
templates/template.html

index f21fb14..d1111fc 100755 (executable)
@@ -467,6 +467,8 @@ class Toolkit_Page
             $this->_pageGateway, MEMBER_SESSION_PAGE
         );
 
+        $this->_getPropertyData();
+
         // check if define for GOOGLE_SEARCH is set
         if (defined("GOOGLE_SEARCH")
             && GOOGLE_SEARCH
@@ -555,6 +557,13 @@ class Toolkit_Page
 
     }
 
+    private function _getPropertyData()
+    {
+        $this->propImageStyle = FILE_SERVER_URL . IS_OWNER_ID . '/propertyImage/';
+        $display              = new Toolkit_Property_Display();
+        $this->property       = $display->getProperty($this->_catid);
+    }
+
     /**
      * Returns page main navigation
      *
index b2920bc..8b007b4 100644 (file)
         </div>
         <div id="main">
             <div id="toolbox">
-                <ul id="propertyImages" class="clearfix">
-<!--                    <li><img src="tmpPropertyImage.jpg"></li>
-                    <li><img src="tmpPropertyImage.jpg"></li>-->
+                <ul id="propertyImages" class="clearfix" flexy:if="property">
+                    <li><img src="{propImageStyle:h}{property[image]:h}" flexy:if="property[image]" /></li>
+                    <li><img src="{propImageStyle:h}{property[image2]:h}" flexy:if="property[image2]" /></li>
                 </ul>
                 {toolboxContent:h}
-                <address propertyonly>
-                    4749 Pleasantview Road &middot; Harbor Springs, MI 49740  &#126;  1-800-748-0245 &middot; troutcreek.com
+                <address  flexy:if="property">
+                    {property[street]} &middot; {property[city]}, {property[state]} {property[zip]} &middot; {property[phone]} &middot; {property[url]}
                 </address>
                 <div id="googlemap">
                     <!--<img src="tmpGooleMap.jpg">-->