From: Steve Sutton Date: Mon, 8 Feb 2010 18:04:46 +0000 (+0000) Subject: more to the template X-Git-Tag: v1.0.0~119 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=9b743d7d1332c1dcd37a75b2c47369474dfe4c4a;p=web%2FTroutCreek.git more to the template --- diff --git a/Toolkit/Page.php b/Toolkit/Page.php index 9b0ed48..5f9529c 100755 --- a/Toolkit/Page.php +++ b/Toolkit/Page.php @@ -158,13 +158,19 @@ class Toolkit_Page $GLOBALS['styleSheets'][] = $this->baseURL . 'styles.css'; $GLOBALS['scripts'][] = $this->glmAppBaseURL . 'libjs/jquery-1.3.2.min.js'; - $GLOBALS['scripts'][] = $this->baseURL . 'libjs/newsletterSignup.js'; + // needed for home page + if ($toolbox->catid == HOME_ID) { + $GLOBALS['scripts'][] = + $this->glmAppBaseURL . 'libjs/jquery.innerfade.js'; + $GLOBALS['scripts'][] = + $this->baseURL . 'libjs/slideshow.js'; + } // bread crumb navigation //$this->breadCrumbs = $toolbox->get_bread_crumbs($toolbox->catid); // main nav - $this->mainNav = $toolbox->get_main_nav(); + $this->mainNav = $toolbox->get_main_nav($topParent); // sideNav if ($toolbox->catid != HOME_ID) { @@ -478,8 +484,29 @@ class Toolkit_Page */ public function headlines($toolbox) { + $dbh = Toolkit_Database::getInstance(); // get headlines aka 'Quick Links' - $this->headlines = $toolbox->get_headlines(); + $this->headlines = array(); + $sql = " + SELECT id,intro,feature_intro,description,image + FROM bus_category + WHERE featured = 't' + ORDER BY parent,pos;"; + $res = $dbh->query($sql); + $rowNumber = $colNumber = 1; + while ($row = $res->fetch(PDO::FETCH_ASSOC)) { // $data as $row ){ + $this->headlines[$rowNumber][$colNumber] = array( + 'col' => ($colNumber == 1) ? 'one': 'two', + 'href' => $this->toolbox->get_seo_url($row['id']), + 'img' => ($row['image']) ? MIDSIZED . $row['image']: '', + 'header' => $row['feature_intro'], + 'descr' => GLM_TOOLBOX::make_teaser($row['description'], 50, true)); + ++$colNumber; + if ($colNumber > 2) { + $colNumber = 1; + ++$rowNumber; + } + } // boolean for if toolbox has headlines $this->hasHeadlines = !empty($this->headlines); } diff --git a/templates/template.html b/templates/template.html index c1126be..cf21c78 100755 --- a/templates/template.html +++ b/templates/template.html @@ -9,19 +9,6 @@ {styles:h} {scripts:h} - - -
@@ -38,16 +25,7 @@
@@ -66,39 +44,25 @@ {toolboxContent:h} -
-
-
-

Headline flagged from Toolbox

- # - Whether you spend the day boating on the Inland Waterway or Little Traverse Bay, it will be a day to remember. - Read More +
+
+
+

{row[1][header]}

+ # + {row[1][descr]} + Read More
-
-

Headline flagged from Toolbox

- # - Whether you spend the day boating on the Inland Waterway or Little Traverse Bay, it will be a day to remember. - Read More +
+

{row[2][header]}

+ # + {row[2][descr]} + Read More
-
-
-

Headline flagged from Toolbox

- # - Whether you spend the day boating on the Inland Waterway or Little Traverse Bay, it will be a day to remember. - Read More -
-
-

Headline flagged from Toolbox

- # - Whether you spend the day boating on the Inland Waterway or Little Traverse Bay, it will be a day to remember. - Read More -
-
-
+
feature items
Specials and Packages @@ -121,25 +85,13 @@
-